unused_formals: Is every function argument used in its body?

Description Usage Arguments Value Examples

View source: R/unused_formals.R

Description

Is every function argument used in its body?

Usage

1

Arguments

fn

A function.

ns

If fn is a character vector, the namespace to which fn belongs.

Value

The arguments of fn that are not used or if all are indeed used NULL invisibly.

Examples

1
2
3
4
5
add3 <- function(x, y, z = 0) {
  x + y
}

unused_formals(add3)

HughParsonage/formalCoverage documentation built on May 14, 2019, 8:19 a.m.