prepare_data_plot: Prepare the data for the forest plots

Description Usage Arguments Value See Also Examples

Description

prepare_data_plot prepares the data for the forest plots. This is an internal function used by plot_forest.

Usage

1
prepare_data_plot(slopes_obj)

Arguments

slopes_obj

A list returned by prepare_slopes that contains the lists with values for the slopes, their confidence intervals and labels.

Value

A dataframe with the information used for plotting.

See Also

plot_forest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## Not run: 
nb_cores <- 2L
meta_Sel_phen <- fit_all(data = dat_Sel,
                         temperature = TRUE, precipitation = FALSE,
                         phenology = TRUE, morphology = FALSE,
                         condition = '3', nb_cores = nb_cores,
                         rand_trait = FALSE, fixed = NULL, digit = 3)

meta_Sel_morph <- fit_all(data = dat_Sel,
                          temperature = TRUE, precipitation = FALSE,
                          phenology = FALSE, morphology = TRUE,
                          condition = '3', nb_cores = nb_cores,
                          rand_trait = FALSE, fixed = NULL, digit = 3)

lab1 <- prepare_labels(meta_obj = meta_Sel_phen$meta_res,
                       labels = c(traits = TRUE,
                                  fitness = TRUE,
                                  country = TRUE,
                                  authors = TRUE),
                      sort = c("Species"),
                      increasing = TRUE)

lab2 <-  prepare_labels(meta_obj = meta_Sel_morph$meta_res,
                       labels = c(traits = TRUE,
                                  fitness = TRUE,
                                  country = TRUE,
                                  authors = TRUE),
                      sort = c("Species"),
                      increasing = TRUE)


test1 <- prepare_slopes(meta_obj1 = meta_Sel_phen$meta_res,
                       labels_obj1 = lab1,
                       labels_obj2 = lab2)

test2 <- prepare_slopes(meta_obj1 = meta_Sel_phen$meta_res,
                        meta_obj2 = meta_Sel_morph$meta_res,
                        labels_obj1 = lab1,
                        labels_obj2 = lab2,
                        list_extra_meta_obj = list(meta_Sel_phen$meta_res,
                                                  meta_Sel_morph$meta_res,
                                                  mod_Sel_T_phen_Fitn$meta_res))

test_col_1 <- prepare_colours(test1)
test_col_2 <- prepare_colours(test2)
prep_data_test1 <- prepare_data_plot(test_col_1)
prep_data_test2 <- prepare_data_plot(test_col_2)

## End(Not run)

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