Learn R Programming

doBy (version 4.6.22)

parseGroupFormula: Extract components from a formula with "conditioning bar"

Description

Extract components from a formula with the form y ~ x1 + ... + xn | g1 + ... + gm

Usage

parseGroupFormula(form)

Value

If the formula is y ~ x1 + x2 | g1 + g2 the result is

model

y ~ x1 + x2

groups

g1 + g2

groupFormula

~ g1 + g2

Arguments

form

A formula of the form y ~ x1 + ... + xn | g1 + ... + gm

Author

Søren Højsgaard, sorenh@math.aau.dk

Examples

Run this code

gf <- parseGroupFormula(y ~ x1 + x2 | g1 + g2)
gf 

Run the code above in your browser using DataLab