List, String, and Meta Programming Utility Functions


[Up] [Top]

Documentation for package ‘toolbox’ version 0.1.1

Help Pages

argNames Get the names of the arguments to a function
argumentNamedList Create a named list of length 1 using a name stored in a variable as the name.
castDateString Format a date string as " from a SQL database to a format compatible with a HTML date input value.
castLogical Convert strings to logical.
castNumeric Convert strings to numeric if possible, otherwise remains as is.
combineCols Combine columns of a list/data frame into a list by row
consolidateList Group items of a list by name
do.call2 Filters the argument list to match the arguments in what and then calls do.call.
doubleQuoteText Add double quotes to strings.
isNULLorNA Checks if x is NULL or NA
jsonStr Format data as a JSON object (like this: "x": "120").
listExtract Extract the values from each entry in a list of vectors at a specific index
namesToString Pastes the names of a object into a string, optionally quoting the names.
pasteCols Paste together columns of a list/data frame
pastePaths Paste parts of file paths/urls separated with single forward-slashes
quoteText Add single quotes to strings, useful for converting R strings into SQL formatted strings.
sampleStr Generates (pseudo)random strings of the specified char length