Edward McNeil
2018-Mar-08 20:05 UTC
[Rd] reshape function: allow split argument to include perl
Hi, I'd like to request that the "split" argument of the reshape function include the perl argument so that "splitting" is more flexible. An example is if the varying argument contains "Q1.1.1, Q1.1.2, Q1.2.1, Q1.2.2, " etc. Splitting on the last "dot" seems to be only possible using perl.> x <- c("Q1.1.1", "Q1.1.2", "Q1.2.1", "Q1.2.2") > strsplit(x, "(\\.)(?=[^\\.]$)", perl=TRUE)[[1]] [1] "Q1.1" "1" [[2]] [1] "Q1.1" "2" [[3]] [1] "Q1.2" "1" [[4]] [1] "Q1.2" "2" Thanks. -- Edward McNeil