filesstrings: An R package for file and string manipulation


filesstrings is an R package providing convenient functions for moving files, deleting directories, and a variety of string operations that facilitate manipulating file names and extracting information from strings. For example, R has no file.move(), just file.copy() and file.rename(), so the best way to move a file was to unintuitively rename it. filesstrings provides file.move(). The package's string operations mostly pertain to dealing with numbers contained within strings. It has a function NiceFileNums() for fixing file names such that their numbering is consistent with alphabetical order. For example, 'file10.txt' comes before 'file9.txt' in alphabetical order, so NiceFileNums() recognises this and renames them to 'file10.txt' and 'file09.txt' respectively. See documentation at


Bache, Stefan Milton, and Hadley Wickham. 2014. Magrittr: A Forward-Pipe Operator for R.

Bengtsson, Henrik. 2017. MatrixStats: Functions That Apply to Rows and Columns of Matrices (and to Vectors).

Clayden, Jon, based on Onigmo by K. Kosako, and K. Takata. 2016. Ore: An R Interface to the Oniguruma Regular Expression Library.

Eddelbuettel, Dirk, and Romain Francois. 2011. “Rcpp: Seamless R and C++ Integration.” Journal of Statistical Software 40 (1): 1–18. doi:10.18637/jss.v040.i08.

Gagolewski, Marek, and Bartek Tartanus. 2016. R Package Stringi: Character String Processing Facilities.

R Core Team. 2017. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.

RStudio Team. 2016. RStudio: Integrated Development Environment for R. Boston, MA: RStudio, Inc.

Wickham, Hadley. 2017. Stringr: Simple, Consistent Wrappers for Common String Operations.

Wickham, Hadley, and Romain Francois. 2016. Dplyr: A Grammar of Data Manipulation.

Wickham, Hadley, Romain Francois, and Kirill Müller. 2017. Tibble: Simple Data Frames.

Wickham, Hadley, Jim Hester, and Romain Francois. 2017. Readr: Read Rectangular Text Data.