plot.desc: Display the corresponding graphic of statistical table

Description Usage Arguments Details See Also Examples

View source: R/plot.desc.R

Description

Display the corresponding graphic of statistical table

Usage

1
2
3
4
## S3 method for class 'desc'
plot(x, ..., title = "", ylim = NULL, xlim = NULL,
  xlab = "", ylab = "", legend.label = "Group", add.sd = F,
  add.ci = F, size.title = 10, add.line = T)

Arguments

x

A desc object

...

Other parameters

title

Character The title of the plot

ylim

Numeric of length 2 for setting y axis limits

xlim

Numeric of length 2 for setting x axis limits

xlab

Character Label for x-axis

ylab

Character Label for y-axis

legend.label

Character Label for the legend (used only if x1 and x2 are not NULL in the desc object)

add.sd

Logical. If TRUE it adds bars to the means representing +/-SD (for desc quanti reporting only)

add.ci

Logical. If TRUE it adds bars to the means representing 95% CI (for LS Means reporting only)

size.title

Numeric. used to specify the font size of the title

add.line

Logical. If TRUE it joins the dots with a line (default to TRUE)

Details

It's a wrapper function which uses gg_desc_quanti gg_desc_quali or gg_desc_lsmeans depending if the desc object is of type "quali", "quanti" or "lsmeans" (argumenttype.desc in desc object, see examples below).

See Also

desc

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
 
data(datafake)

desc=report.quali(data=datafake,y="y_logistic",x1="GROUP",
	x2="TIMEPOINT")

plot(desc,
title="Qualitative desc object with 2 explicative variables",
legend.label="Y levels")



desc2=report.quanti(data=datafake,y="y_numeric",x1="GROUP",
	x2="TIMEPOINT")

plot(desc2,
title="Quantitative desc object with 2 explicative variables",
legend.label="Treatment groups")


#Removing baseline data in the response, for the model

data.mod=droplevels(datafake[datafake$TIMEPOINT!="D0",]) 

library(nlme)
library(emmeans)

mod3=lme(y_numeric~baseline+GROUP+TIMEPOINT+GROUP*TIMEPOINT,
random=~1|SUBJID,data=data.mod,na.action=na.omit)

test3=emmeans(mod3,~GROUP|TIMEPOINT)

tab.mod3=report.lsmeans(lsm=test3)

gg=plot(tab.mod3,title="LS Means plot example")

#Print

gg

ClinReport documentation built on Sept. 3, 2019, 5:07 p.m.