problem for strsplit function
My method would be to use parse and deparse and substitute. It would iterate over each file name and build a new list of file names with the last four characters removed to have only the left side, and only the last four remaining to have only the right side. Then a new dataframe would be created of the partial file names. Deparse and substitute to get the file names into a string, then use character removal on the sides, put the file name into a new vector, and then create the relevant data frame if desired. This allows one to Rely on their software development metaphor. It might lack a certain finess, but the metaphor is either a loom or a boxing match against a CSV so it?s fun. :) Sent from my iPhone
On Jul 9, 2021, at 10:33 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote: ? This discussion has developed in such a way that it seems a better subject line would be "problem for the hairsplit function". :-) cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.