omixerSpecific: Sample List Regeneration

Description Usage Arguments Value Examples

View source: R/omixerSpecific.R

Description

Regenerate an Omixer-produced randomized sample list quickly, after setting up the random environement from omixerRand

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
omixerSpecific(
  df,
  sampleId = "sampleId",
  block = "block",
  wells,
  div = "none",
  positional = FALSE,
  plateNum = 1,
  layout,
  mask = 0,
  techVars,
  randVars
)

Arguments

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

Value

Chosen layout as a data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)

Omixer documentation built on Feb. 4, 2021, 2:01 a.m.