Learn R Programming

matlab2r (version 1.5.0)

nargin: Number of function input arguments

Description

Returns the number of arguments passed to the parent function

Usage

nargin()

Arguments

Value

An integer indicating how many input arguments a function received.

Author

Waldir Leoncio

References

https://stackoverflow.com/q/64422780/1169233

Examples

Run this code
f <- function(x, y, z) return(nargin())
f(pi)
f(y = 6, z = 5)
f(letters)
f(letters, LETTERS, pi)

Run the code above in your browser using DataLab