Re: [R] split & rbind (cast) dataframe

2013-01-11 Thread arun
, 2013 7:46 AM Subject: [R] split & rbind (cast) dataframe Hi, I would like to split dataframe based on one colum and want to connect the two dataframes by rows (like rbind). Here a small example: # The orgininal dataframe df1 <- data.frame(col1 = c("A","A","B&q

Re: [R] split & rbind (cast) dataframe

2013-01-11 Thread J Toll
On Fri, Jan 11, 2013 at 6:46 AM, Johannes Radinger < johannesradin...@gmail.com> wrote: > I would like to split dataframe based on one colum and want > to connect the two dataframes by rows (like rbind). Here a small example: > > # The orgininal dataframe > df1 <- data.frame(col1 = c("A","A","B","

Re: [R] split & rbind (cast) dataframe

2013-01-11 Thread Ista Zahn
Hi Johannes, Your example is tricky because the original df1 does not contain id columns that identify each cell in df2. If you want to use the reshape2 package for this I think you have to add a second id variable: df1 <- data.frame(col1 = c("A","A","B","B"),col2 = c(1:4), col3 = c(1:4)) librar

[R] split & rbind (cast) dataframe

2013-01-11 Thread Johannes Radinger
Hi, I would like to split dataframe based on one colum and want to connect the two dataframes by rows (like rbind). Here a small example: # The orgininal dataframe df1 <- data.frame(col1 = c("A","A","B","B"),col2 = c(1:4), col3 = c(1:4)) # The datafame how it could look like df2 <- data.frame(A.