Skip to contents

Statistical computing / numbers

safe_seq_len()
Generate an integer sequence of specific length (safe)
safe_max()
Maximum (safe)
safe_min()
Minimum (safe)
round_to()
Round to any number
stat_mode()
Statistical mode

Data frames / Tibbles

is_equal_df()
Test if two data frames/tibbles are equal
reduce_df_list()
Reduce a nested list of data frames / tibbles to a single tibble

Lists

as_flat_list()
Convert to a flat list

Strings

Vectorized

as_chr()
Convert to a character vector
escape_lf()
Escape line feeds / newlines
prettify_nr()
Prettify a numeric vector
sentenceify()
Convert to sentence case with trailing punctuation mark
capitalize_first()
Capitalize first letter
wrap_chr()
Wrap character in character

Non-vectorized

as_line_feed_chr()
Convert control character sequence name to actual character sequence
dsv_colnames()
Get column names of a delimiter-separated string

Collapsed into character scalar

as_str()
Convert to a character scalar (aka string)
as_comment_str()
Assemble an (R) comment string of the desired line width
enum_str()
Enumerate vector's elements as string
fuse_regex()
Fuse regular expressions
prose_ls() deprecated
List items concatenated in prose style (..., ... and ...)

Filesystem paths

Functions to work with filesystem paths.

path_mod_time()
Get path modification time
flatten_path_tree()
Flatten path tree
draw_path_tree()
Draw path tree

Dots

Extending rlang’s check dots functions, making the use of R’s ... argument placeholder yet another bit safer.

check_dots_named() experimental
Check that all named dots arguments are valid

R packages

ls_pkg()
List a subset of all installed packages
use_pkg()
Depend on another package
assert_pkg() deprecated
Assert a package is installed
is_pkg_installed()
Test if packages are installed
is_pkg_cran()
Test if a package is available on CRAN
is_pkg_dir()
Test if a directory is an R package
is_pkgdown_dir()
Test if pkgdown is set up for an R package directory
exists_in_namespace()
Test if object exists in namespace
reason_pkg_required()
Assemble reason why package is required

Package configuration

Functions around pal’s canonicalized way to package configuration.

pkg_config_val()
Get package configuration value
pkg_config_val_default()
Get default package configuration value
has_pkg_config_val()
Test if package configuration value is set
augment_pkg_config()
Augment package configuration metadata
print_pkg_config()
Print package configuration metadata

Package DESCRIPTION

Extending the desc package.

desc_list()
Get all DESCRIPTION file fields as cleaned up list
desc_value()
Get value from DESCRIPTION file field, cleaned up and with dynamic fallback
desc_dep_vrsn()
Get dependency version from DESCRIPTION file
desc_url_git()
Get the Git repository URL from DESCRIPTION file

Package documentation

Complementing and extending the roxygen2 package.

fn_param_defaults()
Get function's default parameter values
enum_fn_param_defaults()
Enumerate function's default parameter values
roxy_to_md_links()
Convert roxygen2 documentation links to Markdown
roxy_blocks() experimental
Get roxygen2 blocks
roxy_obj()
Get roxygen2 block object
roxy_tag_value()
Get an object's roxygen2 tag value(s)

(Pandoc) Markdown

md_verb()
Convert to verbatim Markdown
as_md_list()
Convert a character vector to a Markdown list
as_md_vals()
Format values as verbatim Markdown
as_md_val_list()
List values as a Markdown list
pipe_table()
Convert dataframe/tibble to Markdown pipe table
strip_md()
Strip Markdown formatting from character vector
strip_md_footnotes()
Strip Markdown footnotes from character vector

CommonMark parsing

Extending the commonmark package.

md_to_xml()
Parse (R) Markdown as CommonMark XML tree
md_xml_subnode_ix()
Determine CommonMark XML subnode indices
xml_to_md()
Convert from CommonMark XML to (R) Markdown

R Markdown / knitr

build_readme()
Build README.Rmd
knitr_table_format()
Determine current knitr table format
strip_yaml_header()
Strip YAML header from R Markdown

Output formats

Custom R Markdown output formats which can be used in addition to the default output formats.

gitlab_document()
Convert to GitLab Flavored Markdown

HTML widgets

Extending the htmlwidgets package.

write_widget()
Write HTML widget to file
write_widget_deps()
Write HTML widget dependencies

checkmate

Extending the checkmate package.

assert_class_any()
Assert object is member of any class
assert_df_or_tibble()
Assert object is data frame or tibble (extension)
assert_inf_count()
Assert count or Inf

cli

Extending the cli package.

cli_qty_lgl() cli_no_lgl()
cli pluralization helpers for booleans
cli_progress_step_quick()
Quick cli simplified progress message
cli_process_expr() deprecated
Evaluate an expression with cli process indication

Git

Extending the gert and git2r packages.

git_file_mod_time()
Get Git file modification time
git_remote_tree_url()
Get Git remote tree URL

HTTP

Extending the httr and httr2 packages that wrap the curl package.

assert_mime_type()
Assert MIME type
is_http_success()
Test if an HTTP request is successful
is_url()
Test if URL
req_cached()
Perform a cached HTTP GET request

TOML

toml_read()
Read in and parse TOML file as strict list
toml_validate()
Validate TOML

System interaction

test_cli()
Check if CLI tool is available
assert_cli()
Assert CLI tool is available
path_script()
Determine file path of executing script

Miscellaneous

capture_print()
Capture printed console output as string
cat_lines()
Convert to character vector and print newline-separated
cols_regex()
Create readr column specification using regular expression matching
mime_to_ext()
MIME type to file extension
rename_from()
Rename elements from dictionary
arrange_by()
Sort vector by another vector
when()
Generalized if-else for pipes