Re: [R] Combining multiple datasets

2008-08-22 Thread bogdan romocea
Here's a function that does what you asked, you may need to adjust the column names of your data frames before using it. If all your data frames are similar (same number of rows, same years) then try do.call('cbind', yourList). #This function takes a list of data frames and merges them into one

Re: [R] Combining multiple datasets

2008-08-22 Thread jim holtman
Here is the way that I usually do it using lapply: myData <- lapply(list.files(pattern=".RWL$"), function(.file) read.rel(.file, header=TRUE)) # combine into a single dataframe myDF <- do.call(rbind, myData) On Thu, Aug 21, 2008 at 10:42 PM, Alison Macalady <[EMAIL PROTECTED]> wrote: > Hi, > I'

[R] Combining multiple datasets

2008-08-21 Thread Alison Macalady
Hi, I've tried to figure this out using Intro to R and help(), to no avail - I am new at this. I'm trying to write a script that will read multiple files from a directory and then merge them into a single new data frame. The original data are in a tree-ring specific format, and so I've first