omixerSpecific {Omixer} | R Documentation |
Regenerate an Omixer-produced randomized sample list quickly, after setting up the random environement from omixerRand
omixerSpecific( df, sampleId = "sampleId", block = "block", wells, div = "none", positional = FALSE, plateNum = 1, layout, mask = 0, techVars, randVars )
df |
Sample list |
sampleId |
String specifying sample ID variable |
block |
Paired sample identifier |
wells |
Number of wells on a plate |
div |
Plate subdivisions |
positional |
Logical indicator of positional batch effects |
plateNum |
Number of plates |
layout |
Custom plate layout as data frame |
mask |
Wells to be left empty |
techVars |
Technical covariates |
randVars |
Randomization variables |
Chosen layout as a data frame
library(tibble) library(forcats) library(stringr) sampleList <- tibble(sampleId=str_pad(1:48, 4, pad="0"), sex=as_factor(sample(c("m", "f"), 48, replace=TRUE)), age=round(rnorm(48, mean=30, sd=8), 0), smoke=as_factor(sample(c("yes", "ex", "never"), 48, replace=TRUE)), date=sample(seq(as.Date('2008/01/01'), as.Date('2016/01/01'), by="day"), 48)) randVars <- c("sex", "age", "smoke", "date") omixerLayout <- omixerSpecific(sampleList, sampleId="sampleId", block="block", wells=48, div="row", plateNum=1, randVars=randVars)