Description Usage Arguments Examples
Create a barplot with point to visualise comparison. It is also possible to include table to show the value of the plot.
1 2 |
data |
Data set |
x |
x-axis |
yl |
Variable or column for local values |
yc |
Variable or column for national values |
tab |
Include table |
title |
Title for the plot |
scale |
Scale for x-axis ie. percentage or number |
ascending |
Sort data ascending order |
col1 |
Color for bars |
col2 |
Color for the 'diff' bar |
lab1 |
Label for table first column |
lab2 |
Label for table second column |
num |
Include denominator i.e N in the figure eg. Tawau HF (N=2088) |
rotate |
Rotate table text |
leg1 |
Text legend for bar |
leg2 |
Text legend for point |
... |
Additional arguments |
1 2 3 4 5 6 7 8 9 10 11 | library("rreg")
regcom(data = hfdata, x = inst, yl = case2, yc = case1)
# include table
regcom(data = hfdata, x = inst, yl = case2, yc = case1, tab = FALSE)
# keep original order
regcom(data = hfdata, x = inst, yl = case2, yc = case1, scale = "Percentage", ascending = FALSE)
# text for table rotate 10%
regcom(data = hfdata, x = inst, yl = case2, yc = case1, lab1="Tawau", lab2="Negara", rotate=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.