R/one.arg.R

Defines functions one.arg

Documented in one.arg

#' @title One Argument
#' @description Does the function have just one argument?
#' 
#' @param f a function.
#' 
#' @author Eric Archer \email{eric.archer@@noaa.gov}
#' 
#' @examples
#' one.arg(mean)
#' one.arg(one.arg)
#' 
#' @export
#' 
one.arg <- function(f) length(formals(f)) == 1

Try the swfscMisc package in your browser

Any scripts or data that you put into this service are public.

swfscMisc documentation built on Sept. 8, 2023, 5:55 p.m.