r - Error in as.character(split) : cannot coerce type 'closure' to vector of type 'character' -
i totally newbie r programming , here stuck.
i trying extract characters in first column of table "|" in each row following code;
library(limma) temp<- read.delim("c:/users/doe/desktop/work/colon_expression/results.txt", sep ="\t", header = t) temp temp<-limma::strsplit2(temp,split,"|")[,1] temp rstudio gives error;
error in as.character(split) : cannot coerce type 'closure' vector of type 'character'
how can fix coercion problem code ?
try:
limma::strsplit2(temp, "|")[,1] you can strsplit2 documentation ?strsplit2
which gives function strsplit2 requires 2 arguments:
xcharacter vector. here providedtemp.splitcharacter split. here wrotesplit.
so need provide character split (ie., replace split "|").
Comments
Post a Comment