Is it possible to give the argument FUN in apply more than one argument? Im trying to get a list of the mean, median and sd of a given variable in any dataframe.
Example: apply(X = mtcars, MARGIN = mtcars[i], FUN = c(mean, median, sd)
, where i is the variable (or column) of interest. Im not sure if this is the method to use, if not, please guide me to a more suitable method. Thanks!
I want something like this:
data(mtcars)
$mpg
mean median st
20.09 19.2 6.03