Learn R Programming

jollofR (version 0.6.5)

plotHist: plotHist: Produces histogram of the disaggregated population counts across all groups

Description

This function produces a multi-panel histogram plot of the disaggregated population counts across all the groups. The input data could come from any of the disaggregation functions within the 'jollofR' package (both at admin and grid levels) such as 'cheesecake', 'cheesepop', 'slices', etc.

Usage

plotHist(dmat, xlab, ylab)

Value

A graphic image of histogram of the disaggregated population count

Arguments

dmat

A data frame containing the group-structured disaggregated population estimates which could either be observed or predicted from 'cheesecake', 'cheesepop', 'slices','spices', 'spray' , 'sprinkle', 'splash', 'spray', 'sprinkle1', 'splash1', and 'spray1'.

xlab

A user-defined label for the x-axis (e.g., 'Population Count') considered.

ylab

A user-defined label for the y-axis (e.g., 'Frequency') considered.

Examples

Run this code
# \donttest{
if (requireNamespace("INLA", quietly = TRUE)) {
 data(toydata)
 library(ggplot2)
 result <- cheesepop(df = toydata$admin,output_dir = tempdir())
 plotHist(dmat=result$age_pop,
          xlab="Population Count",
          ylab = "Frequency")
}
# }

Run the code above in your browser using DataLab