You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was curious if sub-setting on a single time string should return the data point from each day where that time criteria is met.
Expected behavior
Much like subletting by a single date xtsData['2018-04-27'], I believe I have seen xtsData['T17:00:00'] work at certain points, but currently I am not able to get this to work on minute intervals.
Minimal, reproducible example
### Does Not WorkxtsData['T17:00:00']
V1### WorksxtsData['T17:00:00/T17:00:01']
V12018-02-0117:00:000.80342018-02-0217:00:000.79352018-02-0517:00:000.79002018-02-0617:00:000.78852018-02-0717:00:000.78242018-02-0817:00:000.77962018-02-0917:00:000.77882018-02-1217:00:000.78402018-02-1317:00:000.78562018-02-1417:00:000.7912
Time based subsetting 'T09:00/T17:00' is not fully ISO-8601 compliant.
As I recall, in the ISO standard, the portion after the T is just to get to granularities of less than a day.
So xts's time of day subsetting is more an ISO-8601-style subset that makes a nod to how users generally want the data: accross all days, get the time subset I've specified.
Now getting back to why I think the answer is no.
If you specified just a single time, it isn't really a subset, but rather a single point in time. One what day? With what precision? what about time zone changes or daylight savings time?
So, my thoughts are that the current behavior is correct, and as I would expect it. I'm sure @joshuaulrich will have thoughts as well.
joshuaulrich
changed the title
Subsetting an xts object for a single specific time does not always work
Can't subset using a single specific time of day
May 13, 2018
xtsData.txt
Description
I was curious if sub-setting on a single time string should return the data point from each day where that time criteria is met.
Expected behavior
Much like subletting by a single date xtsData['2018-04-27'], I believe I have seen xtsData['T17:00:00'] work at certain points, but currently I am not able to get this to work on minute intervals.
Minimal, reproducible example
Session Info
The text was updated successfully, but these errors were encountered: