[R] how to split a column by tab ?

Marna Wagley m@rn@@w@g|ey @end|ng |rom gm@||@com
Mon Sep 9 13:54:28 CEST 2019


Hi R User,
I was trying to split a column by tabs, I tried to split with several ways,
but I could not split it. Is there any possibilities?

The data example and the code I used
daT1<-c("Column number             1    2    3    4    5    6    7    8
 9   10   10   10   10   10   10   10",
"comes from position       1    7    2    6    3    5   15    9    4    8
10   11   12   13   14   16"
)
daT2 <- data.frame(do.call('rbind',
strsplit(as.character(daT1),'\t',fixed=T)))
colnames(daT2)
daT2

	[[alternative HTML version deleted]]



More information about the R-help mailing list