Re: [R] Merge two columns of a data frame

2011-06-06 Thread Ethan Brown
Another possibility: dfs <- list(df1, df2, df3) df.1.2.3 <- as.data.frame(unlist(sapply(dfs, function(x) do.call(paste, x On Mon, Jun 6, 2011 at 2:37 PM, Ista Zahn wrote: > Hi Abraham, > Just take it step by step. Paste the values together, combine them, > and assign them to a data.frame col

Re: [R] Merge two columns of a data frame

2011-06-06 Thread Ista Zahn
Hi Abraham, Just take it step by step. Paste the values together, combine them, and assign them to a data.frame column. Like this perhaps: df.1.2.3 <- data.frame(Var1 = c(with(df1, paste(Var1, Var2, Var3)), with(df2, paste(Var1, Var2)), with(df3, paste(Var1, Var2 B

[R] Merge two columns of a data frame

2011-06-06 Thread Abraham Mathew
I have the following data: prefix <- c("cheap", "budget") roots <- c("car insurance", "auto insurance") suffix <- c("quote", "quotes") prefix2 <- c("cheap", "budget") roots2 <- c("car insurance", "auto insurance") roots3 <- c("car insurance", "auto insurance") suffix3 <- c("quote", "quotes") df