[Rd] Problems merging with POSIXct objects and all = TRUE (PR#1121)

a296180@mica.fmr.com a296180@mica.fmr.com
Tue, 9 Oct 2001 14:54:14 +0200 (MET DST)


I am having problems using merge with all = TRUE when one of the dataframes has
objects of class POSIXct. Here is an example:

> version
         _                   
platform sparc-sun-solaris2.6
arch     sparc               
os       solaris2.6          
system   sparc, solaris2.6   
status                       
major    1                   
minor    3.0                 
year     2001                
month    06                  
day      22                  
language R                   
> x <- data.frame(a = as.POSIXct(Sys.time() + (1:3)*10000), b = LETTERS[1:3])
> x
                    a b
1 2001-10-04 17:37:46 A
2 2001-10-04 20:24:26 B
3 2001-10-04 23:11:06 C
> y <- data.frame(b = LETTERS[3:4], c = 1:2)
> y
  b c
1 C 1
2 D 2
> merge(x, y)
  b                   a c
1 C 2001-10-04 23:11:06 1		# This answer is correct
> merge(x, y, all = TRUE)
Error in as.POSIXct.default(value) : Don't know how to convert `value' to class "POSIXct"

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._