get_subjects {danstat}R Documentation

Get a list of subjects covered in the data bank

Description

Get a list of subjects covered in the data bank

Usage

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

# 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)

[Package danstat version 0.2.0 Index]