strsplit(x,""))})$V2)
dat2<-data.frame(V1=dat1$V1,dat2)
names(dat2)<-c("V1",LETTERS[1:6])
> dat2
V1 A B C D E F
1 8098 1 1 0 0 0 0
2 9099 0 0 1 1 0 0
3 0023 1 1 0 0 1 1
4 6545 1 1 1 1 1 1
A.K.
- Original Message -
From: efulas
To: r-help@r-project.o
Perhaps something like this:
x <- c("11", "001100", "001001") # Test data
strsplit(x,"") # See what strsplit does
do.call(rbind, strsplit(x,"")) # Now combine the list elements nicely.
Incidentally, your question was grossly malformed, involving both
incomplete data and that in a non-reprod
Dear all,
I have a data frame with 2 columns and 102500 rows. The data looks like
below
V1V2
809811...
9099001100...
0023110011...
654511...
. .
. .
. .
. .
. .
I want to split the colu
3 matches
Mail list logo