makelabel {MQMF}R Documentation

makelabel generates a label from text and values

Description

It is common to want a label with text and a series of values. But paste and paste0 cycles the text and the values. To avoid this makelabel first combines the values as text and then adds the input text to the front of the values

Usage

makelabel(txt, vect, sep = "_", sigdig = 3)

Arguments

txt

the input text for the label

vect

the series of values to be included in the label

sep

the separator for the components; defaults to _

sigdig

how many significant digits for the values; default = 3

Value

a character string made up of text and values

Examples

pars <- c(18.3319532,33.7935124,3.0378107,6.0194465,0.5815360,0.4270468)
makelabel("Cohort1",pars[c(1,3,5)],sep="__")
makelabel("Cohort1",pars[c(1,3,5)],sep="__",sigdig=4)

[Package MQMF version 0.1.5 Index]