get_variable_availability: Show the availability of requested variables across selected...

Description Usage Arguments Value Examples

View source: R/get_variable_availability.R

Description

Using a map of variables, 'get_variable_availability' returns a list of tibbles showing the availability of requested variables in time

Usage

1
2
3
4
5
6
get_variable_availability(
  variables,
  map = NULL,
  forms = NULL,
  print_plots = FALSE
)

Arguments

variables

A character vector with requires variable names in lowercase.

map

A folder map retrieved from map_folders. If left empty, the function will search the working directory for a map file. Can be also used to specify file path to the map file.

forms

A character vector with forms of interest, in the following form c("v11","v12") etc., where the number specifies form number. If blank, all forms are used. For form numbers, consult forms_codes().

print_plots

Logical indicating whether the function should print plots. Plots will be available in output even if not printed.

Value

a list of tibbles with requested variables and identifiers, and a tibble with information about used sheets. To join into a single tibble, use bind_rows() on the tibble list.

Examples

1
2
availability <- get_variable_availability(variables = c("r01010","r01011"), map = my_map, forms = "v03")
availability$plots$v03

jmunich/readMSMT documentation built on March 17, 2020, 9:14 a.m.