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

2015-02-17 Thread Bert Gunter
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 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

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 aravindjayaramana...@gmail.com 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.

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

2015-02-17 Thread Zilefac Elvis via R-help
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 iris2.csv - iris names - c(iris1.csv, iris2.csv) dat - mget(names) lst4 - lapply(dat, function(x) apply(x[,-5

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

2015-02-17 Thread Chris Campbell
: 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 iris2.csv - iris names - c(iris1.csv

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

[R] split dataframe to several dataframes in R

2015-02-16 Thread js . huang
/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. /quote Quoted from: http://r.789695.n4.nabble.com/split-dataframe-to-several-dataframes-in-R-tp4703372.html

[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(lst4)