comparison_plot: Plot comparison plot

Description Usage Arguments Details Value See Also Examples

View source: R/comparison_plot.R

Description

Produces comparison_plot based on previously processed data - theoretical or experimental. User can change labels if needed.

Usage

1
2
3
4
5
6
7
comparison_plot(
  calc_dat,
  theoretical = FALSE,
  relative = TRUE,
  state_first = "state_first",
  state_second = "state_second"
)

Arguments

calc_dat

processed data from DynamX file - using prepare_dataset

theoretical

logical value to determine if plot is theoretical or not. default : false

relative

logical value to determine if values are relative or absolute. default : true

state_first

first state name

state_second

second state name

Details

...

This is the first version - multi-state calculations are not supported.

Value

a ggplot object.

See Also

read_hdx prepare_dataset

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
# load example data
dat <- read_hdx(system.file(package = "HaDeX", "HaDeX/data/KD_180110_CD160_HVEM.csv"))

# prepare dataset for states `CD160` and `CD160_HVEM` in given time parameters
calc_dat <- prepare_dataset(dat,
                            in_state_first = "CD160_0.001",
                            chosen_state_first = "CD160_1",
                            out_state_first = "CD160_1440",
                            in_state_second = "CD160_HVEM_0.001",
                            chosen_state_second = "CD160_HVEM_1",
                            out_state_second = "CD160_HVEM_1440")       

# plot comparison plot - theoretical & relative                      
comparison_plot(calc_dat = calc_dat,
                theoretical = TRUE,
                relative = TRUE,
                state_first = "CD160",
                state_second = "CD160_HVEM")
                
# plot comparison plot - experimental & relative                      
comparison_plot(calc_dat = calc_dat,
                theoretical = FALSE,
                relative = TRUE,
                state_first = "CD160",
                state_second = "CD160_HVEM")  
                
# plot comparison plot - theoretical & absolute                      
comparison_plot(calc_dat = calc_dat,
                theoretical = TRUE,
                relative = FALSE,
                state_first = "CD160",
                state_second = "CD160_HVEM")

# plot comparison plot - experimental & absolute                      
comparison_plot(calc_dat = calc_dat,
                theoretical = FALSE,
                relative = FALSE,
                state_first = "CD160",
                state_second = "CD160_HVEM")                

HaDeX documentation built on Aug. 12, 2021, 5:20 p.m.