get_subjects: Get a list of subjects covered in the data bank

Description Usage Arguments Value Examples

View source: R/get_subjects.R

Description

Get a list of subjects covered in the data bank

Usage

1
2
3
4
5
6
get_subjects(
  subjects = NULL,
  recursive = FALSE,
  include_tables = FALSE,
  language = c("en", "da")
)

Arguments

subjects

Provide specific subject id's to get subtopics. E.g. subjects = c("02", "2419")

recursive

Whether subtopics/tables will be retrieved all the way down the hierarchy. Otherwise, only the closest level under the provided subjects will be retrieved. Default = FALSE

include_tables

Whether the result should contain tables. Otherwise, only subjects are returned. Default = FALSE

language

Language for the return object. Default = "en"

Value

A data frame

Examples

1
2
3
4
5
6
7
8
# Get all subjects
all_subjects <- get_subjects()

# Or get (sub)subjects for specific subjects
some_subjects <- get_subjects(subjects = c("2", "3"))

# Get all subject hierarchy for a given subject
subject_with_hierarchy <- get_subjects(subjects = "2", recursive = TRUE)

danstat documentation built on Jan. 31, 2022, 9:08 a.m.