search for: strsplit3

Displaying 1 result from an estimated 1 matches for "strsplit3".

Did you mean: strsplit
2010 Mar 29
3
one way to write scripts in R
...)) { x=y y=prechomp(x) } x } strsplit2=function(x,split,...) { # detect trailing split : and add "" afterwards, so we know if it was there. a=strsplit(pp(x,"|@|@|"),split,...) lapply(a,function(x) gsub("|@|@|","",x,fixed=TRUE)) } strsplit3=function(x,split,keepsplit=FALSE,...) { if (keepsplit) { repstring="34HERE43" if (length(grep(repstring,x))) { die(repstring, " repstring already found. Arg! Aborting") } # sanity check # note where we want to split, using \\1 backref to keep the original...