tests/testthat/test-generate_dictionary.R

test_that("generate_dictionary creates a data dictionary from a data frame", {

  path_train <- test_path("extdata", "Wages.sav")

  train_data <- read_spss_data(file = path_train)

  expect_equal(names(generate_dictionary(train_data)) , c("position", "variable", "description", "column type", "missing", "levels"))

})

Try the bulkreadr package in your browser

Any scripts or data that you put into this service are public.

bulkreadr documentation built on May 29, 2024, 1:35 a.m.