, 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
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","
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
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.
4 matches
Mail list logo