Skip to content
Prev 7449 / 63421 Next

I() fails on objects of class POSIXct (PR#1587)

Although the documentation is somewhat sketchy, I() can be used to create
objects of class AsIs:
[1] "a"
attr(,"class")
[1] "AsIs"      "character"
[1] 4
attr(,"class")
[1] "AsIs"    "numeric"
[1] 4+0i
attr(,"class")
[1] "AsIs"    "complex"
This fails for objects of class POSIXct.
[1] "POSIXt"  "POSIXct"
Error in names(x) : evaluation is nested too deeply: infinite recursion?
Interestingly enough, it produces an (incorrect?) answer for objects of class
POSIXlt
[1] "POSIXt"  "POSIXlt"
[1] "  0" "  0" "  8" " 21" "  4" "102" "  2" "140" "  1"
Of course, this may not be a bug since it is not clear that I() is documented
to do anything like this.
_                   
platform sparc-sun-solaris2.6
arch     sparc               
os       solaris2.6          
system   sparc, solaris2.6   
status                       
major    1                   
minor    5.0                 
year     2002                
month    04                  
day      29                  
language R                   

Regards,

David Kane

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._