Learn R Programming

devFunc (version 0.1)

Clear and Condense Argument Check for User-Defined Functions

Description

A concise check of the format of one or multiple input arguments (data type, length or value) is provided. Since multiple input arguments can be tested simultaneously, a lengthly list of checks at the beginning of your function can be avoided, hereby enhancing the readability and maintainability of your code.

Copy Link

Version

Install

install.packages('devFunc')

Monthly Downloads

202

Version

0.1

License

GPL-3

Maintainer

Robin Oirbeek

Last Published

January 24th, 2018

Functions in devFunc (0.1)

checkCharVec

Checking if all elements of a list are all character vectors
checkIntVec

Checking if all elements of a list are all integer vectors
checkLength

Checking if the length of the different elements of a list corresponds to what one expects.
checkLogicVec

Checking if all elements of a list are all logical vectors
checkNumOrIntVec

Checking if all elements of a list are all integer or numeric vectors
checkNumVec

Checking if all elements of a list are all numeric vectors
checkRanges

Checking if the value of a numeric or integer variable (of length 1) is located within a certain range.
checkValues

Checking if the value of vectors (of length 1) is authorized.