Learn R Programming

SamplingStrata (version 1.5-4)

plotSamprate: Plotting sampling rates in the different strata for each domain in the solution.

Description

Once the optimization step has been carried out, by applying this function it is possible to obtain the visualization of the proportion of sampling units in the different strata for each domain in the obtained solution.

Usage

plotSamprate(solution, dom)

Value

Plot

Arguments

solution

Solution obtained by executing optimizeStrata

dom

Identification of the domain

Examples

Run this code
if (FALSE) {
library(SamplingStrata)
data(swisserrors)
data(swissstrata)
# optimisation of sampling strata
solution <- optimizeStrata ( 
    errors = swisserrors, 
    strata = swissstrata, 
)
# plot of the sampling rates in strata 
for (i in (1:length(unique(swissstrata$DOM1)))) plotSamprate(solution, i)
}

Run the code above in your browser using DataLab