Nothing
context("test makeProblem()")
test_that("makeProblem works", {
skip_on_cran()
utils::data("microdata1", package = "sdcTable")
dim.region <- data.frame(
levels = c("@", "@@", "@@", "@@", "@@"),
codes = c("Total", "A", "B", "C", "D"),
stringsAsFactors = FALSE
)
dim.gender <- data.frame(
levels = c("@", "@@", "@@"),
codes = c("Total", "male", "female"),
stringsAsFactors = FALSE
)
dimList <- list(region = dim.region, gender = dim.gender)
dimVarInd <- c(1, 2)
freqVarInd <- numVarInd <- weightInd <- sampWeightInd <- NULL
problem <- makeProblem(
data = microdata1,
dimList = dimList,
dimVarInd = dimVarInd,
freqVarInd = freqVarInd,
numVarInd = numVarInd,
weightInd = weightInd,
sampWeightInd = sampWeightInd
)
expect_is(problem, "sdcProblem")
expect_equal(get.problemInstance(problem@problemInstance, "nrVars"), 15)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.