Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utcdate and anydate don't seem to play well with factors (OSX) #44

Closed
mcheema opened this issue Jan 27, 2017 · 1 comment
Closed

utcdate and anydate don't seem to play well with factors (OSX) #44

mcheema opened this issue Jan 27, 2017 · 1 comment

Comments

@mcheema
Copy link

mcheema commented Jan 27, 2017

I am running R on OSX within emacs or from terminal and run into problems like below:

as.factor(20160101 + 0:2)
### [1] 20160101 20160102 20160103
### Levels: 20160101 20160102 20160103
anytime(as.factor(20160101 + 0:2))
### [1] "2015-12-31 23:00:00 GMT" "2016-01-01 23:00:00 GMT"
### [3] "2016-01-02 23:00:00 GMT"
utctime(as.factor(20160101 + 0:2))
### [1] "2016-01-01 GMT" "2016-01-02 GMT" "2016-01-03 GMT"
utcdate(as.factor(20160101 + 0:2))
### [1] "1400-01-01" "1400-02-01" "1400-03-01"
anydate(as.factor(20160101 + 0:2))
[1] "1400-01-01" "1400-02-01" "1400-03-01"
@eddelbuettel
Copy link
Owner

Good catch. I do a filtering step for anytime() at the R side and failed to insert it for anydate.

Will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants