Re: [R] Merging data.table and data.frame

2014-05-13 Thread Jeff Newmiller
Works for me. Can you make a reproducible example [1] the way the footers of all emails on this list ask you to? The str and dput functions are very useful tools mentioned in the referenced article. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On W

Re: [R] Merging data.table and data.frame

2014-05-13 Thread Abhinaba Roy
Hi Peter, Thanks for your reply, I tried to convert my data.table into a data.frame and then merging but I am getting the same error. But when I check the class of my previously data.table object it returns "data.frame". Any clue as to why this is happening? Regards On Tue, May 13, 2014 at 7:

Re: [R] Merging data.table and data.frame

2014-05-13 Thread peter dalgaard
On 13 May 2014, at 14:34 , Abhinaba Roy wrote: > Hi R-helpers, > > I am trying the following code in R > > merge(x=Master1,y=demo_dtls,by.x=c("ID_CASE","ts"),by.y=c("ID_CASE","TS_EVENT")) > > where, > > class(demo_dtls$TS_EVENT) > [1] "POSIXct" "POSIXt" > class(Master1$ts) > [1] "POSIXct" "P

Re: [R] Merging data.table and data.frame

2014-05-13 Thread Jeff Newmiller
Because merge.data.table expects both objects to be data.table objects? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] Merging data.table and data.frame

2014-05-13 Thread Abhinaba Roy
Hi R-helpers, I am trying the following code in R merge(x=Master1,y=demo_dtls,by.x=c("ID_CASE","ts"),by.y=c("ID_CASE","TS_EVENT")) where, class(demo_dtls$TS_EVENT) [1] "POSIXct" "POSIXt" class(Master1$ts) [1] "POSIXct" "POSIXt" and > class(Master1)[1] "data.table" "data.frame"> class(demo_dtl