Displaying 1 result from an estimated 1 matches for "str3_name5".
Did you mean:
str1_name2
2012 Sep 27
4
Colsplit, removing parts of a string
Hi,
I am using colsplit (package = reshape) to split all strings
in a column according to the same patterns. Here
an example:
library(reshape2)
df1 <- data.frame(x=c("str1_name2", "str3_name5"))
df2 <- data.frame(df1, colsplit(df1$x, pattern = "_", names=c("str","name")))
This is nearly what I want but I want to remove the words "str" and
"name" from the values, because the columns are already named with
that words. Is there a w...