make.label: Make pretty labels from variable names

Description Usage Arguments Details Value Examples

View source: R/make.label.R

Description

make.label

Mainly used to prettyfy the rownames of anova tables.

Usage

1
2
make.label(x, l = list(l1 = c("_", " at "), l2 = c(":",
  " interaction with "), l3 = c(".", " ")))

Arguments

x

Character

l

List Each first element is gsubised by the second element of the list

Details

Replace with gsub function each first element of l[[i]] by the second element of l[[i]] for each element of x.

Value

A character

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(datafake)
an=anova(lm(y_numeric~y_logistic+GROUP:TIMEPOINT,data=datafake))

# Raw output:
an

rownames(an)=make.label(rownames(an),
l=list(
l1=c("y_logistic","A logistic variable"),
l2=c(":"," interaction with "))
)

# Gives:

an

ClinReport documentation built on Sept. 3, 2019, 5:07 p.m.