makelabel | R Documentation |
makelabel 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
makelabel(txt, vect, sep = "_", digits = 3)
txt |
the input text for the label, can be empty |
vect |
the series of values to be included in the label |
sep |
the separator for the components; defaults to '_' |
digits |
how many significant digits for the values; default = 3 |
a character string made up of text and values
pars <- c(18.3319532,33.7935124,3.0378107,6.0194465,0.5815360,0.4270468)
makelabel("Cohort1",pars[c(1,3,5)],sep="__")
makelabel("",pars[c(1,3,5)],sep="__",digits=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.