a <- "dog cat carrot cabbage"
b <- "orange cat chair cabbage"
c <- "dog phone book beach"
x <- data.frame(a,b,c)
> x
a b c
1 dog cat carrot cabbage orange cat chair cabbage dog phone book beach
So that's been built in columns. What I want is a 1 column data frame with each string as a row. How would I do that?
d <- c(a,b,c)
data.frame(d)
Output:
d
1 dog cat carrot cabbage
2 orange cat chair cabbage
3 dog phone book beach
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments