latex.cr_group: Latex method for objects of class 'cr_group'

Description Usage Arguments Author(s) See Also Examples

View source: R/cr_group.r

Description

Objects of class cr_group have attributes 'rgroup' and/or 'cgroup'. These are extracted for use in the latex function of package Hmics

Usage

1
2
latex.cr_group(object, r.perm = "as.is", c.perm = "as.is",
  colheads = TRUE, file = "", title = "", ...)

Arguments

object

an 'cr_group' object

r.perm

should be either (interpretable as) 'as.is', 'alphabetical' or a permutation of sort(unique(attr(object, "rgroup"))). If 'as.is' row groups are ordered as they appear in 'rgroups', if 'alphabetical' they appear in alphabetical order, otherwise in the permutation given.

c.perm

is analogous to r.perm

colheads

is an argument that if 'character' is passed to latex but if TRUE will set 'colheads' (in latex) to the objects attribute 'colnames' (if possible, else dimnames(object)[[2]])

file

is an argument passed to latex (default "")

title

is an argument passed to latex (default "")

...

additional arguments passed to latex

Author(s)

Henrik Renlund

See Also

Hmisc::latex, cr_group

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
nr <- 7; nc <- 5; M <- matrix(1:(nr*nc), nrow=nr, byrow=TRUE)
rownames(M) <- letters[1:nr]
colnames(M) <- LETTERS[1:nc]
attr(M, "rgroup") <- rep(c("foo", "bar", "baz"), length.out=nr)
attr(M, "cgroup") <- rep(c("Fuzzy", "Busy"), length.out=nc)
class(M) <- "cr_group"
dummy <- Hmisc::latex(M, r.perm='as.is', c.perm='alpha')
# see vignette

## End(Not run)

renlund/dataman documentation built on May 27, 2019, 5:51 a.m.