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

check_args

Check Argument Types, Length or Dimension


Description

Check Argument Types, Length or Dimension

Usage

check_args(arg, type, length = NULL, dim = NULL)

Arguments

arg

An argument to be checked.

type

A character vector of candidate argument type.

length

A numeric value of argument length or NULL

dim

A numeric vector of argument dimension or NULL.

Details

if type, length or dim is NULL, the corresponding check will not be executed.

Value

Check failure detailed error message

Specification

The contents of this section are shown in PDF user manual only.

Examples

## Not run: 
tbl < -as.data.frame(matrix(1:9, nrow = 3))
check_args(arg = tbl, type = c("data.frame"))

vec <- c("a", "b", "c")
check_args(arg = vec, type = c("character"), length = 3)

## End(Not run)

r2rtf

Easily Create Presentation-Ready Rich Text Format (RTF) Table and Figure

v0.2.0
GPL-3
Authors
Yilong Zhang [aut, cre], Siruo Wang [aut], Simiao Ye [aut], Madhusudhan Ginnaram [aut], Merck Sharp & Dohme Corp [cph]
Initial release

We don't support your browser anymore

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