Learn R Programming

⚠️There's a newer version (3.4.0) of this package.Take me there.

filesstrings

This started out as a package for file and string manipulation. Since then, the fs file manipulation package and the `strex string manipulation package emerged, offering functionality previously given by this package (but slightly better). Those packages have hence almost pushed ‘filesstrings’ into extinction. However, it still has a small number of unique, handy file manipulation functions which can be seen in the vignette. One example is a function to remove spaces from all file names in a directory.

Installation

To install the release version of filesstrings from CRAN, in R, enter

install.packages("filesstrings")

Copy Link

Version

Install

install.packages('filesstrings')

Monthly Downloads

1,482

Version

3.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rory Nolan

Last Published

October 10th, 2020

Functions in filesstrings (3.2.0)

filesstrings

filesstrings: handy file and string manipulation
can_be_numeric

Check if a string could be considered as numeric.
currency

Get the currencies of numbers within a string.
all_equal

create_dir

Create directories if they don't already exist
extract_non_numerics

Extract non-numbers from a string.
extend_char_vec

Pad a character vector with empty strings.
before_last_dot

Get the part of a string before the last period.
give_ext

Ensure a file name has the intended extension.
extract_numbers

Extract numbers from a string.
nth_number_after_mth

Find the nth number after the mth occurrence of a pattern.
match_arg

Argument Matching
move_files

Move files around.
singleize

Remove back-to-back duplicates of a pattern in a string.
rename_with_nums

Replace file names with numbers
nth_number_before_mth

Find the nth number before the mth occurrence of a pattern.
str_after_nth

Text after the nth occurrence of pattern.
str_before_nth

Text before the nth occurrence of pattern.
nice_file_nums

Make file numbers comply with alphabetical order
str_locate_nth

Get the indices of the \(n\)th instance of a pattern.
nice_nums

Make string numbers comply with alphabetical order
put_in_pos

Put specified strings in specified positions in an otherwise empty character vector.
remove_dir

Remove directories
str_to_vec

Convert a string to a vector of characters
str_paste_elems

Extract bits of a string and paste them together.
trim_anything

Trim something other than whitespace
str_split_by_nums

Split a string by its numeric characters.
str_elems

Extract several single elements from a string.
str_elem

Extract a single character from a string, using its index.
str_split_camel_case

Split a string based on CamelCase
locate_braces

Locate the braces in a string.
remove_quoted

Remove the quoted parts of a string.
group_close

Group together close adjacent elements of a vector.
remove_filename_spaces

Remove spaces in file names
unitize_dirs

Put files with the same unit measurements into directories