[R] merging lists within lists via time stamp
    tomtomme 
    langkamp at tomblog.de
       
    Mon Aug  8 18:28:02 CEST 2011
    
    
  
still no answer? I´ll try to be more precise and will ask on stack-overflow
too...
I´ve got multiple data.frames of gps- and temperature-data within a list.
One data.frame looks like:
GPS:
           date     time     x.lat     x.lon   
    1      22.05.11 13:50:37 53.57908 10.034599 
    2      22.05.11 13:50:38 53.57906 10.034633 
temp:
            date     time     temp
    1      22.05.11 13:50:38 21.6120
    2      22.05.11 13:50:39 21.6070
So I have two lists, one with multiple gps-data.frames and one with multiple
temp-dataframes. I used lapply to manipulate both lists, but can´t merge
temp and gps to one big list, containing all data.frames, for only
time-stamps which exists in both list, like for the above example only
13:50:38 exists in both:
GPS+temp:
           date     time    x.lat     x.lon     temp
    1      22.05.11 13:50:38 53.57906 10.034633 21.6070
For the single data-frames that worked just fine with:
    both <- merge(gps,temp)
For the two lists of data.frames I first tried an lapply over both
lists...something like
    both <- lapply(temp, gps, function(x){x <- merge(x);x})
Then I tried it with 
    both <- merge.list(gps,temp)
but this doesn´t work either. It just transfers the first list "gps" to both
Thanks for any hint, Thomas 
--
View this message in context: http://r.789695.n4.nabble.com/merging-lists-within-lists-via-time-stamp-tp3712631p3727496.html
Sent from the R help mailing list archive at Nabble.com.
    
    
More information about the R-help
mailing list