MNG01
Mean Plot Graph.
mng01.Rd
Overview of a summary statistics across time and arm for a selected data set.
Usage
mng01_main(
adam_db,
dataset = "adlb",
x_var = "AVISIT",
y_var = "AVAL",
y_name = "PARAM",
y_unit = NULL,
arm_var = "ACTARM",
center_fun = "mean",
interval_fun = "mean_ci",
show_table = TRUE,
jitter = TRUE,
show_n = TRUE,
show_h_grid = TRUE,
show_v_grid = FALSE,
legend_pos = "top",
line_col = nestcolor::color_palette(),
...
)
mng01_pre(adam_db, dataset, x_var = "AVISIT", ...)
mng01_post(tlg, ...)
mng01
Arguments
- adam_db
(
list
ofdata.frames
) object containing theADaM
datasets- dataset
(
string
) the name of a table in theadam_db
object.- x_var
(
string
) the name of a column in thedataset
to represent on the x-axis.- y_var
(
string
) the name of the variable to be represented on the y-axis.- y_name
(
string
) the variable name fory
. Used for plot's subtitle.- y_unit
(
string
) the name of the variable with the units ofy
. Used for plot's subtitle. ifNULL
, onlyy_name
is displayed as subtitle.- arm_var
(
string
) variable used for column splitting- center_fun
(
string
) the function to compute the estimate value.- interval_fun
(
string
) the function defining the crossbar range.- show_table
(
flag
) should the summary statistic table be displayed.- jitter
(
flag
) should data point be slightly spread on the x-axis.- show_n
(
flag
) should the number of observation be displayed int the table.- show_h_grid
(
flag
) should horizontal grid be displayed.- show_v_grid
(
flag
) should vertical grid be displayed.- legend_pos
(
string
) the position of the legend.- line_col
(
character
) describing the colors to use for the lines or a namedcharacter
associating values ofarm_var
with color names.- ...
not used.
- tlg
(
TableTree
,Listing
orggplot
) object typically produced by amain
function.
Note
adam_db
object must contain the table specified bydataset
with the columns specified byx_var
,y_var
,y_name
,y_unit
andarm_var
.
Examples
col <- c(
"A: Drug X" = "black",
"B: Placebo" = "blue",
"C: Combination" = "gray"
)
run(mng01, syn_data, dataset = "adlb", x_var = c("AVISIT", "AVISITN"), line_col = col)
#> $`Alanine Aminotransferase Measurement`
#>
#> $`C-Reactive Protein Measurement`
#>
#> $`Immunoglobulin A Measurement`
#>
#> attr(,"class")
#> [1] "gg_list" "list"