sp_get_table_file: Get path to a CSV file containing a table.

View source: R/tables.R

sp_get_table_fileR Documentation

Get path to a CSV file containing a table.

Description

This is normally called inside sp_get_table() but can be used separately if finer-grained control of intermediate outputs is needed, e.g. in a targets workflow.

Usage

sp_get_table_file(table_id, dataset_path, reunzip = FALSE)

Arguments

table_id

Table ID; see id column in sp_tables for a list of available codelists.

dataset_path

Path to downloaded dataset, as output by sp_get_dataset()

reunzip

Whether to overwrite existing CSV files by unzipping the archive downlaoded by sp_get_dataset(). Defaults to FALSE.

Value

Character vector of length one - a path.

See Also

Other Detailed workflow: sp_get_codelist_file(), sp_get_codelist_url(), sp_get_dataset_url(), sp_load_codelist(), sp_load_table()

Examples

## Not run: 
ds <- sp_get_dataset("rozv", 2018, 12)
sp_get_table_file("balance-sheet", ds)

## End(Not run)

statnipokladna documentation built on Dec. 28, 2022, 2:36 a.m.