Displaying 1 result from an estimated 1 matches for "scale3".
Did you mean:
scale
2012 Sep 26
2
specifying arguments in functions and calling functions, within functions
Esteemed R UseRs,
Regarding specifying arguments in functions and calling functions
within functions:
## beginning ##
## some data
ex <- rnorm(10)
ex[5] <- NA
## example function
Scale <- function(x, method=c("mean", "median")) {
scl <- method
scl(x)
}
## both return NA
Scale(ex, method=median)
median(ex, na.rm=FALSE)
## both return the median
Scale(ex,