plotTab | R Documentation |
Compares graphically the estimated distributions for the same categorical variable(s) using data coming from two different data sources.
plotTab(data.A, data.B, xlab.A, xlab.B=NULL, w.A=NULL, w.B=NULL)
data.A |
A dataframe or matrix containing the variable of interest |
data.B |
A dataframe or matrix containing the variable of interest |
xlab.A |
Character string providing the name(s) of one or more variables in |
xlab.B |
Character string providing the name(s) of one or more variables in |
w.A |
Character string providing the name of the optional weighting variable in |
w.B |
Character string providing the name of the optional weighting variable in |
This function compares graphically the (joint) distribution of the same variables but estimated from data coming from two different data sources. The graphical comparison is done using barcharts.
The required graphical representation is drawn using the ggplot2 facilities.
Marcello D'Orazio mdo.statmatch@gmail.com
comp.prop
# plotTab(data.A = samp.A, data.B = samp.B, xlab.A="edu7", w.A = "ww")
# plotTab(data.A = samp.A, data.B = samp.B, xlab.A=c("urb", "sex"), w.A = "ww", w.B="ww")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.