search for: repeated_test

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

2008 May 02
2
Accesing data frame members from within functions
...e how to translate this code into a function. In particular, I'm not sure how to write a function that passes a data frame ds (containing Category, Value1, and Value2 as members) as an argument, and then accessing these members within the body of the function. I've tried the following: repeated_test <- function(data) { for(i in 1:21) { x <- t.test(ds$Value1[ds$Category == i], ds$Value2[ds$Category == i]) y <- c(y, x$p.value) } This will run, but only if the members of the data frame I am passing as an argument ar...