block2lme: Put block in lme-compatible format

block2lmeR Documentation

Put block in lme-compatible format

Description

Put block in lme-compatible format

Usage

block2lme(block, ...)

## S3 method for class 'list'
block2lme(block, verbose = TRUE, ...)

## S3 method for class 'formula'
block2lme(block, verbose = TRUE, ...)

## S3 method for class 'character'
block2lme(block, verbose = TRUE, ...)

formula2lmer(formula, block)

formula2lm(formula, block)

block_vars(formula)

Arguments

block

block: charactervector or formula

...

required for s3 dispatch

verbose

TRUE or FALSE

formula

formula

Examples

# lme: ensure lme-compatiblae block specification
    block2lme( block = list(subject = ~1, batch = ~1))
    block2lme( block =   ~1|subject)
    block2lme( block =   c('subject',    'batch'))

# lm: integrate block into formula as random effect
    formula2lm(   formula = ~ subgroup,  block = c('subject', 'batch') )

# lmer: integrate block into formula as fixed effect
    formula2lmer( formula = ~ subgroup,  block = c('subject',    'batch') )
    formula2lmer( formula = ~ subgroup         + (1|subject) + (1|batch ) )

bhagwataditya/importomics documentation built on June 15, 2024, 1:05 a.m.