search for: toyfn

Displaying 1 result from an estimated 1 matches for "toyfn".

Did you mean: token
2010 Aug 19
0
Gathering different data types for aov etc
...assing a list for the RHS when I don't think I am. Here's a toy example: r <- matrix(rnorm(30), ncol = 3) # toy data td <- list(d = rnorm(10), f1 = sample(c("A", "B"), 10, replace = TRUE), f2 = sample(c("C", "D"), 10, replace = TRUE)) toyFn <- function(my.list, my.data, fac = NULL) { response <- my.data fac <- data.frame(my.list[fac]) # str(fac) # a data frame! man <- manova(response ~ fac) print(summary(man)) invisible(man) } toyFn(td, r, fac = "f1") toyFn(td, r, fac = c("f1&quot...