I can actually answer this!! I was trying to figure out how to use sapply
for a function I wrote with multiple arguments.
Suppose the function is called
FUN(a,b), where a is a number and b is a number
You can use mapply(FUN, a = VECTOR, b = VECTOR) where each vector is your
input arguments. It
chipmaney wrote:
typically, the apply family wants you to use vectors to run functions on.
However, I have a function, kruskal.test, that requires 2 arguments.
kruskal.test(Herb.df$Score,Herb.df$Year)
This easily computes the KW ANOVA statistic for any difference across
years
However, my
2 matches
Mail list logo