Learn R Programming

SeuratObject (version 5.0.2)

CheckDots: 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)

Value

Emits either an error or warning if an argument passed is unused; invisibly returns 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 ...

Examples

Run this code
if (FALSE) {
f <- function(x, ...) {
  CheckDots(...)
  return(x ^ 2)
}
f(x = 3, y = 9)
}

Run the code above in your browser using DataLab