CheckDots: Check the Use of Dots

View source: R/utils.R

CheckDotsR Documentation

Check the Use of Dots

Description

Function to check the use of unused arguments passed to ...; this function is designed to be called from another function to see if an argument passed to ... remains unused and alert the user if so. Also accepts a vector of function or function names to see if ... can be used in a downstream function

Usage

CheckDots(..., fxns = NULL)

Arguments

...

Arguments passed to a function that fall under ...

fxns

A list/vector of functions or function names

Details

Behavior of CheckDots can be controlled by the following option(s):

Seurat.checkdots

Control how to alert the presence of unused arguments in ...; choose from

  • warn”: emit a warning (default)

  • error”: throw an error

  • silent”: no not alert the presence of unused arguments in ...

Value

Emits either an error or warning if an argument passed is unused; invisibly returns NULL

Examples

## Not run: 
f <- function(x, ...) {
  CheckDots(...)
  return(x ^ 2)
}
f(x = 3, y = 9)

## End(Not run)


SeuratObject documentation built on May 29, 2024, 12:31 p.m.