Learn R Programming

flowWorkspace (version 3.16.0)

mkformula: make a formula from a character vector

Description

construct a valid formula to be used by flowViz::xyplot

Usage

mkformula(dims, isChar = FALSE)

Arguments

dims
a character vector that contains y , x axis, if it is unnamed, then treated as the order of c(y,x)
isChar
logical flag indicating whehter to return a formula or a pasted string

Value

when isChar is TRUE, return a character, otherwise coerce it as a formula

Examples

Run this code
all.equal(mkformula(c("SSC-A", "FSC-A")),`SSC-A` ~ `FSC-A`)#unamed vecotr
all.equal(mkformula(c(x = "SSC-A", y = "FSC-A")),`FSC-A` ~ `SSC-A`)#named vector

Run the code above in your browser using DataLab