Learn R Programming

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

xfun

This package contains several utility functions that I frequently use in other packages, and also miscellaneous functions that I use by myself from time to time. For more information, see https://yihui.name/xfun/.

Copy Link

Version

Install

install.packages('xfun')

Monthly Downloads

1,206,097

Version

0.6

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

April 2nd, 2019

Functions in xfun (0.6)

attr

Obtain an attribute of an object without partial matching
isFALSE

Test if an object is identical to FALSE
is_ascii

Check if a character vector consists of entirely ASCII characters
protect_math

Protect math expressions in pairs of backticks in Markdown
is_windows

Test for types of operating systems
parse_only

Parse R code and do not keep the source
raw_string

Print a character vector in its raw form
optipng

Run OptiPNG on all PNG files under a directory
numbers_to_words

Convert numbers to English words
session_info

An alternative to sessionInfo() to print session information
strict_list

Strict lists
embed_file

Embed a file, multiple files, or directory on an HTML page
normalize_path

Normalize paths
rstudio_type

Type a character vector into the RStudio source editor
pkg_attach

Attach or load packages, and automatically install missing packages if requested
rev_check

Run R CMD check on the reverse dependencies of a package
read_utf8

Read / write files encoded in UTF-8
same_path

Test if two paths are the same after they are normalized
prose_index

Find the indices of lines in Markdown that are prose (not code blocks)
stringsAsStrings

Set the global option options(stringsAsFactors = FALSE) inside a parent function and restore the option after the parent function exits
tojson

A simple JSON serializer
try_silent

Try to evaluate an expression silently
upload_ftp

Upload to an FTP server via curl
gsub_file

Search and replace strings in files
in_dir

Evaluate an expression under a specified working directory
Rscript

Run the commands Rscript and R CMD
install_dir

Install a source package from a directory
native_encode

Try to use the system native encoding to represent a character vector
install_github

An alias of remotes::install_github()
file_ext

Manipulate filename extensions
file_string

Read a text file and concatenate the lines by '\n'
download_file

Try various methods to download a file