Learn R Programming

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

filesstrings (version 3.1.1)

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,029

Version

3.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rory Nolan

Last Published

May 14th, 2019

Functions in filesstrings (3.1.1)

nice_file_nums

Make file numbers comply with alphabetical order
currency

Get the currencies of numbers within a string.
str_elem

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

Extract several single elements from a string.
give_ext

Ensure a file name has the intended extension.
nice_nums

Make string numbers comply with alphabetical order
extract_non_numerics

Extract non-numbers from a string.
extract_numbers

Extract numbers from a string.
extend_char_vec

Pad a character vector with empty strings.
nth_number_before_mth

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

Group together close adjacent elements of a vector.
locate_braces

Locate the braces in a string.
str_locate_nth

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

Argument Matching
str_paste_elems

Extract bits of a string and paste them together.
unitize_dirs

Put files with the same unit measurements into directories
move_files

Move files around.
put_in_pos

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

Remove directories
rename_with_nums

Replace file names with numbers
str_after_nth

Text after the nth occurrence of pattern.
singleize

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

Remove spaces in file names
str_before_nth

Text before the nth occurrence of pattern.
remove_quoted

Remove the quoted parts of a string.
str_to_vec

Convert a string to a vector of characters
str_split_by_nums

Split a string by its numeric characters.
trim_anything

Trim something other than whitespace
str_split_camel_case

Split a string based on CamelCase
all_equal

before_last_dot

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

filesstrings: handy file and string manipulation
nth_number_after_mth

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

Check if a string could be considered as numeric.
create_dir

Create directories if they don't already exist