Learn R Programming

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

filesstrings (version 3.0.0)

Handy File and String Manipulation

Description

This started out as a package for file and string manipulation. Since then, the 'fs' and 'strex' packages emerged, offering functionality previously given by this package (but it's done better in these new ones). 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.

Copy Link

Version

Install

install.packages('filesstrings')

Monthly Downloads

1,145

Version

3.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rory Nolan

Last Published

October 30th, 2018

Functions in filesstrings (3.0.0)

move_files

Move files around.
create_dir

Create directories if they don't already exist
all_equal

nice_nums

Make string numbers comply with alphabetical order
rename_with_nums

Replace file names with numbers
remove_dir

Remove directories
nice_file_nums

Make file numbers comply with alphabetical order
nth_number_after_mth

Find the \(n\)th number after the \(m\)th occurrence of a pattern.
str_after_nth

Text before or after \(n\)th occurrence of pattern.
singleize

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

Trim something other than whitespace
unitize_dirs

Put files with the same unit measurements into directories
remove_filename_spaces

Remove spaces in file names
before_last_dot

Get the part of a string before the last period.
filesstrings-defunct

Defunct functions in filesstrings
filesstrings

filesstrings: handy file and string manipulation
str_split_camel_case

Split a string based on CamelCase
str_to_vec

Convert a string to a vector of characters
put_in_pos

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

Find the \(n\)th number before the \(m\)th occurrence of a pattern.
str_elem

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

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

Ensure a file name has the intended extension.
group_close

Group together close adjacent elements of a vector.
str_paste_elems

Extract bits of a string and paste them together
str_split_by_nums

Split a string by its numeric characters.
can_be_numeric

Check if a string could be considered as numeric.
currency

Get the currencies of numbers within a string.
extend_char_vec

Pad a character vector with empty strings.
extract_non_numerics

Extract non-numbers from a string.
match_arg

Argument Matching
locate_braces

Locate the braces in a string.
extract_numbers

Extract numbers from a string.
remove_quoted

Remove the quoted parts of a string.