Miscellaneous Functions to Support Packages Maintained by 'Yihui Xie'
Miscellaneous functions commonly used in other packages maintained by 'Yihui Xie'.
Run the commands Rscript and R CMD
Call a function in a new R session via Rscript()
Obtain an attribute of an object without partial matching
Encode/decode data into/from base64 encoding.
Generate the Data URI for a file
Start a background process
Bump version numbers
Cache the value of an R expression to an RDS file
Delete an empty directory
Create a directory recursively by default
Test the existence of files and directories
Perform a task once in an R session
Try various methods to download a file
Embed a file, multiple files, or directory on an HTML page
Call on.exit() in a parent function
Manipulate filename extensions
Read a text file and concatenate the lines by '\n'
Get the relative path of a path in a project relative to the current working directory
Get the tags of Github releases of a repository
Perform replacement with gsub() on elements matched from grep()
Search and replace strings in files
Evaluate an expression under a specified working directory
Install a source package from a directory
An alias of remotes::install_github()
Test if an object is identical to FALSE
Some utility functions for checking packages
Test if paths are relative or absolute
Check if a character vector consists of entirely ASCII characters
Test if a path is a subpath of a dir
Test if a path is a web path
Find a file or directory under a root directory
Mark some paths as directories
Generate a message with cat()
Try to use the system native encoding to represent a character vector
Normalize paths
Convert numbers to English words
Run OptiPNG on all PNG files under a directory
Test for types of operating systems
Parse R code and do not keep the source
Attach or load packages, and automatically install missing packages if requested
Kill a process and (optionally) all its child processes
Read a text file, process the text with a function, and write the text back
Return the (possible) root directory of a project
Find the indices of lines in Markdown that are prose (not code blocks)
Protect math expressions in pairs of backticks in Markdown
Print a character vector in its raw form
Read all records of a binary file as a raw vector by default
Read / write files encoded in UTF-8
Get the relative path of a path relative to a directory
Rename files with a sequential numeric prefix
Retry calling a function for a number of times
Run R CMD check on the reverse dependencies of a package
Type a character vector into the RStudio source editor
Test if two paths are the same after they are normalized
An alternative to sessionInfo() to print session information
Set environment variables
Split a character vector by line breaks
Split source lines into complete expressions
Strict lists
Set the global option options(stringsAsFactors = FALSE) inside a parent function and restore the option after the parent function exits
A simple JSON serializer
Turn the output of str() into a tree diagram
Try to evaluate an expression silently
Upload to an FTP server via curl
Extract filenames from a URLs
Check if the syntax of the code is valid
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.