Last data update: 2014.03.03

R: Checks the inputs to the package: dataframes "errors",...
checkInputR Documentation

Checks the inputs to the package: dataframes "errors", "strata" and "sampling frame"

Description

This functions checks the internal structure of the different input dataframes ("errors", "strata" and "sampling frame"), and also the correctness of the relationships among them.

Usage

checkInput(errors=NULL, strata=NULL, sampframe=NULL)

Arguments

errors

Dataframe containing the precision levels expressed in terms of maximum acceptable coefficients of variation that estimates of target variables Y's of the survey must comply.

strata

Dataframe containing the information related to strata.

sampframe

Dataframe containing the information related to all the units belonging to the population of interest.

Author(s)

Giulio Barcaroli

Examples

library(SamplingStrata)
data(swisserrors)
data(swissstrata)
data(swissframe)
checkInput(swisserrors,swissstrata,swissframe)
checkInput(strata=swissstrata,sampframe=swissframe)
checkInput(strata=swissstrata)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SamplingStrata)
Loading required package: memoise
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SamplingStrata/checkInput.Rd_%03d_medium.png", width=480, height=480)
> ### Name: checkInput
> ### Title: Checks the inputs to the package: dataframes "errors", "strata"
> ###   and "sampling frame"
> ### Aliases: checkInput
> ### Keywords: survey
> 
> ### ** Examples
> 
> library(SamplingStrata)
> data(swisserrors)
> data(swissstrata)
> data(swissframe)
> checkInput(swisserrors,swissstrata,swissframe)

Input data have been checked and are compliant with requirements
> checkInput(strata=swissstrata,sampframe=swissframe)

Input data have been checked and are compliant with requirements
> checkInput(strata=swissstrata)

Input data have been checked and are compliant with requirements
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>