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
The above algorithm is $O(1)$ for sorted data but for for unsorted data it is $O(n)$ but that’s the best we can get to. See this Discourse post for some more discussion.
Similarly, other methods can also be written for counting months, etc.
The text was updated successfully, but these errors were encountered:
In xts, they are:
nweeks
,nseconds
,nmonths
, etc.Counting weeks in non-trivial, has to be done like this:
Performance
For sorted data
For unsorted data:
The above algorithm is$O(1)$ for sorted data but for for unsorted data it is $O(n)$ but that’s the best we can get to. See this Discourse post for some more discussion.
Similarly, other methods can also be written for counting months, etc.
The text was updated successfully, but these errors were encountered: