inst/Examples/Example5/Analysis/Results/together.R

# -------------------------------------------------------
# Put together results from various runs of samon.
# -------------------------------------------------------
options( width=150, max.print=250 )

library(samon, lib.loc="../../../../samlib")

## there are 100 files each with 20 by 6 imputations
filenames1 <- sprintf("../RDS/Results_1_%05d.rds",1:100)
filenames2 <- sprintf("../RDS/Results_2_%05d.rds",1:100)

trt1 <- samonCombineIM( filenames1 )
trt2 <- samonCombineIM( filenames2 )

saveRDS( trt1, file = "RDS/treatment1Results.rds")
saveRDS( trt2, file = "RDS/treatment2Results.rds")

Try the samon package in your browser

Any scripts or data that you put into this service are public.

samon documentation built on Oct. 26, 2023, 9:06 a.m.