glmer.output.R 672 Bytes
Newer Older
1
2
3
#!/usr/bin/env Rscript

source("R/analysis/glmer.output-fun.R")
4
files <- list.files("output/glmer", recursive=TRUE,  full.names =TRUE, pattern = "glmer.results.rds")
5
6
7
8
9
10
11
out <- lapply(files, summarise.glmer.output.list)
names(out) <- lapply(lapply(files,files.details),function(x) paste(as.vector(x[-6]),collapse="_"))
saveRDS(out,file='output/glmer.list.out.rds')
names.param <- unique(unlist(lapply(out,function(list.res) names(list.res$glmer.summary$fixed.coeff.E))))
DF.results <- do.call("rbind",lapply(out,fun.format.in.data.frame,names.param=names.param))
DF.results$id <- paste(DF.results$set,DF.results$ecocode,sep=".")
saveRDS(DF.results,file='output/glmer.DF.rds')