Abbreviate treatment names
Auxiliary function to create uniquely abbreviated treatment names.
treats(x, nchar.trts = 8, row = TRUE)
x |
A vector with treatment names or a matrix with treatment names as row and / or column names. |
nchar.trts |
A numeric defining the minimum number of characters used to create unique treatment names. |
row |
A logical indicating whether row or column names should
be used (only considered if argument |
This auxiliary function can be used to create uniquely abbreviated treatment names (and is used internally in several R functions for this purpose).
Initially, to construct uniquely abbreviated treatment names,
substring
is used to extract the first
nchar.trts
characters. If these abbreviated treatment names
are not unique, abbreviate
with argument
minlength = nchar.trts
is used.
Guido Schwarzer sc@imbi.uni-freiburg.de
data(Senn2013) # net1 <- netmeta(TE, seTE, treat1, treat2, studlab, data = Senn2013) # Use matrix with fixed effects estimates to create unique # treatment names (with four characters) # treats(net1$TE.fixed, nchar.trts = 4) # With two characters # treats(net1$TE.fixed, nchar.trts = 2) # With one character # treats(net1$TE.fixed, nchar.trts = 1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.