Learn R Programming

filesstrings (version 1.1.0)

PasteCollapseListElems: Deprecated functions

Description

These functions have been deprecated, mostly because the naming style of the package has been changed. To figure out which function to run instead, run the deprecated function of interest and you'll get a warning message telling you which function to use instead.

Usage

PasteCollapseListElems(char_list, collapse = "")

StrListRemoveEmpties(char_list)

CharListElemsNthElem(char_list, n)

NumListElemsNthElem(num_list, n)

CreateDirsIfNotThere(dir.names)

RemoveDirs(dirs)

MergeTablesOnDisk(file.names, delim, out.name, header = TRUE, ...)

MoveFiles(files, destinations)

NiceFileNums(dir = ".", pattern = NA)

RemoveFileNameSpaces(dir = ".", pattern = "", replace.with = "")

RenameWithNums(dir = ".", pattern = NULL)

UnitDirs(unit, pattern = NULL, dir = ".")

CanBeNumeric(string)

GetCurrencies(string)

GetCurrency(strings)

DuplicatesToSingles(string, pattern)

NiceNums(strings)

ExtractNumbers(string, leave.as.string = FALSE, decimals = FALSE, leading.decimals = FALSE, negs = FALSE)

ExtractNonNumerics(string, decimals = FALSE, leading.decimals = FALSE, negs = FALSE)

NthNumber(string, n = 1, leave.as.string = FALSE, decimals = FALSE, leading.decimals = FALSE, negs = FALSE)

NthNonNumeric(string, n = 1, decimals = FALSE, leading.decimals = FALSE, negs = FALSE)

StrSplitByNums(string, decimals = FALSE, leading.decimals = FALSE, negs = FALSE)

StrElem(string, index)

StrElemsPasted(string, indices)

StringToVec(string)

StringsWithPatterns(strings, patterns, ignore.case = FALSE, any = FALSE)

StrAfterNth(strings, pattern, n = 1)

StrBeforeNth(strings, pattern, n = 1)

BeforeLastDot(string)

ExtendCharVec(char.vec, extend.by = NA, length.out = NA)

PasteDifferentLengths(files, sep = "")

PutInPos(strings, positions)

TrimAnything(string, pattern, side = "both")

CountMatches(string, pattern)

LocateBraces(string)

RemoveQuoted(string)

GiveExt(string, ext, replace = FALSE)

SplitCamelCase(string, lower = FALSE)

AllEqual(a, b = NULL)

GroupClose(vec.ascending, max.gap = 1)

Arguments

char_list

A list of character vectors.

collapse

See paste.

n

A natural number to identify the \(n\)th occurrence (defaults to first (n = 1)). This can be negatively indexed, so if you wish to select the last occurrence, you need n = -1, for the second-last, you need n = -2 and so on.

num_list

A list of numeric vectors.

dir.names

The name of the directories, specified via relative or absolute paths.

dirs

The names of the directories, specified via relative or absolute paths.

file.names

The paths to the files to merge.

delim

Delimeter used to separate values.

out.name

The path to the output file containing the merged tables.

header

Do the tables to be merged have headers?

...

Additional arguments passed to readr::read_delim.

files

A character vector of files to be read in via readLines to be pasted. If you would like to use this function on vectors already in the environment (without reading in files), pass them into this argument as a list (see the examples).

destinations

A character vector of the destination directories into which to move the files.

dir

The directory in which to rename the files (relative or absolute path). Defaults to current working directory.

pattern

A character vector. Tegular expression(s) of the pattern(s) that we wish not to be duplicated.

replace.with

What do you want to replace the spaces with? This defaults to nothing, another sensible choice would be an underscore.

unit

The unit upon which to base the categorising.

string

A string.

strings

A character vector.

leave.as.string

Do you want to return the number as a string (TRUE) or as numeric (FALSE, the default)?

decimals

Do you want to include the possibility of decimal numbers (TRUE) or not (FALSE, the default).

leading.decimals

Do you want to allow a leading decimal point to be the start of a number?

negs

Do you want to allow negative numbers? Note that double negatives are not handled here (see the examples).

index

An integer. Negative indexing is allowed as in stringr::str_sub().

indices

A numeric vector of positive integers detailing the indices of the characters of string that we wish to paste together.

patterns

Regular expressions.

ignore.case

Do we want to ignore case when matching patterns?

any

Set this to TRUE if you want to see which strings match any of the patterns and not all (all is the default).

char.vec

A character vector. The thing you wish to expand.

extend.by

A non-negative integer. By how much do you wish to extend the vector?

length.out

A positive integer. How long do you want the output vector to be?

sep

What (if anything) do you want to paste in between things as you're pasting them together.

positions

The indices of the charachter vector to be occupied by the elements of strings. Must be the same length as strings or of length 1.

side

Which side do you want to trim from? "both" is the default, but you can also have just either "left" or "right" (or optionally the shorthands "b", "l" and "r").

ext

The intended file extension (with or without the ".").

replace

If the file has an extension already, replace it (or append the new extension name)?

lower

Do you want the output to be all lower case (or as is)?

a

A vector.

b

Either NULL or a vector of length either 1 or length(a)

vec.ascending

A strictly increasing numeric vector.

max.gap

The biggest allowable gap between adjacent elements for them to be considered part of the same group.

Value

Invisibly, a logical vector with TRUE for each success and FALSE for failures. See base::unlink.

A character vector. TRUE if the argument can be considered to be numeric or FALSE otherwise.