Functions
File operations
File operations
| writeLines | Write text to a file |
| readLines | Read some or all text lines from a file. |
| savePickle | Save a python object as a binary file |
| readPickle | Load a python object saved with savePickle |
| unzip | Unzip all files from a zip file to a certain path |
| zip_archive | Zip a folder to a file |
| writeZip | Write bytes to a zip file |
Path operations
Path operations
| getwd | Get the current working directory |
| setwd | Set the current working directory |
| file_path | Construct a path to a file or paths to files |
| file_path_sans_ext | Get the path of a file without the extension |
| file_ext | Get the extension of a file |
| list_files | List all files in a directory |
| system_file | Get the path where a python package is installed |
| file_exists | Test if a file exists |
| file_copy | Copy files |
| file_remove | Remove files |
| unlink | Delete an entire directory tree |
| tempdir | Get the the path to a tempory directory |
| tempfile | Get the the path to a tempory file |
| dirname | Get the root directory of a file or folder |
| basename | Get the basename of a file |
General object operations
General object operations
| unique | Get unique values in a list |
| append | Append list-like elements together |
| setdiff | Performs set difference on two lists |
| intersect | Performs intersection on two lists |
| union | Performs the union of two lists |
| match | Looks up x in table and returns the positions where it has found x |
| match_arg | Match an argument to an existing set of possible values |
| rm | Deletes objects from globals() |
Text operations
Text operations
| letters | Get the 26 lowercased letters as a list |
| LETTERS | Get the 26 uppercased ASCII letters as a list |
| tolower | Put text in lower casing |
| toupper | Put text in upper casing |
| paste | Paste text by concatenating the strings |
| strsplit | Splits text according to a regular expression into a list |
| nchar | Count the number of characters in text |
| substr | Get a substring of text from position start up to and including position end. |
| trimws | Remove leading and/or trailing whitespace from character strings. |
| gsub | Pattern replacement in texts |
| grepl | Identify the existing matches in texts |
Dates
Dates
| Sys_Date | Get the current date |
| Sys_time | Get the current time |
Environment
Environment
| Sys_getenv | Obtains the values of the environment variables |
| Sys_setenv | Set the values of environment variables |
| Sys_unsetenv | Clears an environment variable |