Re: [R] split dataframe to several dataframes in R

2015-02-17 Thread Zilefac Elvis via R-help
Great! Thanks, Aravind. On Monday, February 16, 2015 10:50 PM, Aravind Jayaraman wrote: Hi, I think you need not split the data.frame to get the desired result. You can work with your list lst4 itself. #Convert the vectors in the list to data.frames. lst4 <- lapply(lst4, function(x

Re: [R] split dataframe to several dataframes in R

2015-02-17 Thread Zilefac Elvis via R-help
t; -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Zilefac Elvis > via R-help > Sent: 17 February 2015 03:54 > To: R. Help > Subject: [R] split dataframe to several dataframes in R > > Hi All,I have a dataframe called 'means

Re: [R] split dataframe to several dataframes in R

2015-02-17 Thread Bert Gunter
is Campbell, PhD > > Tel. +44 (0)1249 705 450 | Mobile. +44 (0) 7929 628 349 > www.mango-solutions.com > Mango Solutions > 2 Methuen Park, Chippenham, Wiltshire. SN14 OGB UK > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Zile

Re: [R] split dataframe to several dataframes in R

2015-02-17 Thread Chris Campbell
-Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Zilefac Elvis via R-help Sent: 17 February 2015 03:54 To: R. Help Subject: [R] split dataframe to several dataframes in R Hi All,I have a dataframe called 'means' as shown below:iris1.csv <- iris

[R] split dataframe to several dataframes in R

2015-02-16 Thread js . huang
Hi All,I have a dataframe called 'means' as shown below:iris1.csv <- iris iris2.csv <- iris names <- c("iris1.csv", "iris2.csv") dat <- mget(names) lst4 <- lapply(dat, function(x) apply(x[,-5], 2, mean)) # Build the new data frame means <- as.data.frame(do.call(rbind, lst4)) means$source <- names

Re: [R] split dataframe to several dataframes in R

2015-02-16 Thread Aravind Jayaraman
Hi, I think you need not split the data.frame to get the desired result. You can work with your list lst4 itself. #Convert the vectors in the list to data.frames. lst4 <- lapply(lst4, function(x) {as.data.frame(t(iris1.csv))}) #Get the data.frames in the list to the global environment list2env(ls

[R] split dataframe to several dataframes in R

2015-02-16 Thread Zilefac Elvis via R-help
Hi All,I have a dataframe called 'means' as shown below:iris1.csv <- iris iris2.csv <- iris names <- c("iris1.csv", "iris2.csv") dat <- mget(names) lst4 <- lapply(dat, function(x) apply(x[,-5], 2, mean)) # Build the new data frame means <- as.data.frame(do.call(rbind, lst4)) means$source <- names(