Displaying 1 result from an estimated 1 matches for "sumstats2".
Did you mean:
sumstats
2009 Sep 28
4
Re ading Functions that are in a Vector
...ctor 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 <- c("mean","sd")
Is there a way to change "mean" to the function mean?
--
View this message in context: http://www.nabble.com/Reading-Functions-that-are-in-a-Vector-tp25639720p25639720.html
Sent from the R help mailing list archive at Nabble.com.