# NOT RUN {
## stratified by sex, 100 in stratum, 2 treatments
male <- blockrand(n=100, id.prefix='M', block.prefix='M',stratum='Male')
female <- blockrand(n=100, id.prefix='F', block.prefix='F',stratum='Female')
my.study <- rbind(male,female)
# }
# NOT RUN {
plotblockrand(my.study,'mystudy.pdf',
top=list(text=c('My Study','Patient: %ID%','Treatment: %TREAT%'),
col=c('black','black','red'),font=c(1,1,4)),
middle=list(text=c("My Study","Sex: %STRAT%","Patient: %ID%"),
col=c('black','blue','green'),font=c(1,2,3)),
bottom="Call 123-4567 to report patient entry",
cut.marks=TRUE)
### or
blockrand.txt <- list(
top=list(text=c('My Study','Patient: %ID%','Treatment: %TREAT%'),
col=c('black','black','red'),font=c(1,1,4)),
middle=list(text=c("My Study","Sex: %STRAT%","Patient: %ID%"),
col=c('black','blue','green'),font=c(1,2,3)),
bottom="Call 123-4567 to report patient entry")
plotblockrand(my.study, 'mystudy.pdf', cut.marks=TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab