Displaying 1 result from an estimated 1 matches for "sumstat1".
Did you mean:
sumstats
2009 Sep 28
4
Re ading Functions that are in a Vector
I am trying to write a function that will have an input of a vector of
functions. Here is a simplistic example.
sumstats <- c(mean,sd)
sumstats[1]
#Gives this error
#> sumstats[1]
#[[1]]
#function (x, ...)
#UseMethod("mean")
#<environment: namespace:base>
I thought about restricting the input to character variables such as the
following
sumstats2 <-