prepare_labels: Create the labels for the forest plots

Description Usage Arguments Value See Also Examples

Description

prepare_labels prepares the labels for the forest plots. This is an internal function used by plot_forest.

Usage

1
prepare_labels(meta_obj = NULL, labels, sort, increasing)

Arguments

meta_obj

A fitted meta-analytical model object.

labels

A vector specifying what should be used as labels for each study. See Details for kinds of labels available.

sort

A vector specifying the variables to use for sorting the labels.

increasing

A Boolean specifying whether the slopes should be sorted in increasing (TRUE) or decreasing (FALSE) order.

Value

A list with two elements: the labels and the order of the study.

The possible types of labels are:

If the label is set to TRUE (default), it will be displayed on the plot.

See Also

plot_forest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
dat_sel_phen <- prepare_data(data = dat_Sel,
                             temperature = TRUE, precipitation = FALSE,
                             phenology = TRUE, morphology = FALSE)
test_sel <- extract_effects_all_ids(data = dat_sel_phen,
                                    condition = '3', nb_cores = nb_cores)
test_meta_sel <- fit_meta(test_sel)
prepare_labels(meta_obj = test_meta_sel,
               labels = c(traits = TRUE,
                          fitness = TRUE,
                          country = TRUE,
                          authors = TRUE),
               sort = c("Species", "Study_Authors", "Fitness_Categ"),
               increasing = TRUE)

## End(Not run)

radchukv/adRes documentation built on June 1, 2019, 7:05 p.m.