# NOT RUN {
# }
# NOT RUN {
Design <- data.frame(N = c(10, 20, 30))
Generate <- function(condition, fixed_objects = NULL) {
dat <- with(condition, rnorm(N, 10, 5)) # distributed N(10, 5)
dat
}
Analyse <- function(condition, dat, fixed_objects = NULL) {
ret <- mean(dat) # mean of the sample data vector
ret
}
\dontrun{
# run the simulation
runSimulation(design=Design, replications=50,
generate=Generate, analyse=Analyse,
summarise=NA, save_results=TRUE,
save_details = list(save_results_dirname='simresults'))
Summarise <- function(condition, results, fixed_objects = NULL){
ret <- c(mu=mean(results), SE=sd(results))
ret
}
SimClean('SimDesign-results.rds')
res <- reSummarise(Summarise, dir = 'simresults/')
res
Summarise2 <- function(condition, results, fixed_objects = NULL) {
mean(results)
}
res2 <- reSummarise(Summarise2, dir = 'simresults/')
res2
SimClean('simresults/')
}
# }
Run the code above in your browser using DataLab