Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

params

Parameters for chk functions


Description

Descriptions of the parameters and return values for the chk functions

Arguments

x

The object to check.

x_name

A string of the name of object x or NULL.

y

An object to check against.

chk

A flag specifying whether to check the other parameters.

chk_fun

A chk_ function.

tolerance

A non-negative numeric scalar.

ext

A character vector of the permitted file extensions (without the .).

exists

A flag specifying whether the files/directories must (or must not) exist.

value

A non-missing scalar of a value.

range

A non-missing sorted vector of length 2 of the lower and upper permitted values.

regexp

A string of a regular expression.

values

A vector of the permitted values.

class

A string specifying the class.

formals

A count of the number of formal arguments.

incomparables

A vector of values that cannot be compared. FALSE means that all values can be compared.

by

A character vector specifying the column names to join x and y on. If named the names are the corresponding columns in x.

exclusive

A flag specifying whether x must only include columns named in values.

order

A flag specifying whether the order of columns in x must match names in values.

nrow

A flag or a whole numeric vector of the value, value range or possible values.

key

A character vector of the columns that represent a unique key.

vld_fun

A vld_ function.

...

Additional arguments.

Value

The chk_ function throws an informative error if the test fails.

The vld_ function returns a flag indicating whether the test was met.


chk

Check User-Supplied Function Arguments

v0.5.1
MIT + file LICENSE
Authors
Joe Thorley [aut, cre] (<https://orcid.org/0000-0002-7683-4592>), Kirill Müller [aut] (<https://orcid.org/0000-0002-1416-3412>), Ayla Pearson [ctb] (<https://orcid.org/0000-0001-7388-1222>), Poisson Consulting [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.