View source: R/helpful_functions.R
sort_label | R Documentation |
The function will sort the grouping variable (Label) according to Controls for plotting. By defining control_fac1 and control_fac2 you can set the corresponding grouping variable (label) to the first place in order. _Caution: The column that should be ordered must be organized as a factor._
sort_label(
root_norm,
label_delim = ";",
col_label = "Label",
control_fac1,
control_fac2
)
root_norm |
data.frame; normalized Rootdetection data set |
label_delim |
character; defines how Factor1 and Factor2 are separated in Label |
col_label |
string; name of the column carring the grouping variable (Label) |
control_fac1 |
string; name of the control condition of grouping variable1 (Factor1) |
control_fac2 |
string; name of the control condition of grouping variable2 (Factor2) |
data.frame; with sorted col_label
# obtain normalized Rootdetection data.frame
root_norm <- norm_10mm_standard(root_output)
# check the default sorting of the grouping variable (Labels)
# sorted alphabetically by default
levels(root_norm$Label)
# change order of levels by setting yucOx and 28 as controls
sort_label(root_norm, control_fac1 = "yucOx", control_fac2 = "28")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.