View source: R/plot.intsvy.mean.R
plot.intsvy.mean | R Documentation |
Functions pisa.mean, pisa.mean.pv, piaac.mean, piaac.mean.pv produce object of the class intsvy.mean. The function plot.intsvy.mean presents these means graphically.
## S3 method for class 'intsvy.mean'
plot(x, se = TRUE, sort = FALSE, ...)
x |
An object of the class intsvy.mean returned by pisa.mean, pisa.mean.pv, piaac.mean or piaac.mean.pv functions. |
se |
If TRUE add whiskers for standard errors. |
sort |
If TRUE groups are sorted along averages. |
... |
Not used. Required for cran-check. |
Returns object of ggplot class with dotplot. Works for one way, two-way and three-way effects.
plot.intsvy.table, plot.intsvy.reg
## Not run:
# Country averages
head(pmeansNC <- piaac.mean.pv(pvlabel="NUM", by="CNTRYID", data=piaac, export=FALSE))
# plotting country average NUM performance
plot(pmeansNC) + ggtitle("Country performance in NUM")
# without se bars, not good idea
plot(pmeansNC, se=FALSE)
# sorted, thats better
plot(pmeansNC, sort=TRUE)
# Country averages for different age groups
head(pmeansNCA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "AGEG10LFS"),
data=piaac, export=FALSE))
#
# plotting country average within
# age groups NUM performance
plot(pmeansNCA, sort=TRUE)
# Country averages for different age and gender groups (changed order)
head(pmeansNCGA <- piaac.mean.pv(pvlabel="NUM", by=c("CNTRYID", "GENDER_R", "AGEG10LFS"),
data=piaac, export=FALSE))
#
# plotting country average within
# age and gender groups NUM performance
plot(na.omit(pmeansNCGA), sort=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.