| sc_table_class | R Documentation |
R6 Class for all responses of the /table endpoint of the 'STATcube' REST API.
STATcubeR::sc_data -> sc_table
responsethe httr response
rawthe raw response content
annotation_legendlist of all annotations occurring in the data as a data.frame with
two columns for the annotation keys and annotation labels.
rate_limithow much requests were left after the POST request for this table was sent?
Uses the same format as sc_rate_limit_table().
jsonan object of class sc_json based the json file used in the request
new()Usually, objects of class sc_table are generated with
one of the factory methods sc_table(), sc_table_saved() or
sc_table_custom(). If this constructor is invoked directly,
either omit the parameters json and file or make sure that they
match with response.
sc_table_class$new(response, json = NULL, file = NULL, add_totals = FALSE)
responsea response from httr::POST() against the /table
endpoint.
jsonthe json file used in the request as a string.
filethe file path to the json file
add_totalswas the json request modified by adding totals via
the add_totals parameter in one of the factory functions (sc_table(),
sc_table_custom()). Necessary, in order to also request totals via
the $add_language() method.
update()Update the data by re-sending the json to the API. This is still experimental and could break the object in case new levels were added to one of the fields. For example, if a new entry is added to a timeseries
sc_table_class$update()
tabulate()An extension of sc_tabulate() with additional
parameters.
sc_table_class$tabulate( ..., round = FALSE, annotations = FALSE, recode_zeros = FALSE )
...Parameters which are passed down to sc_tabulate()
roundapply rounding to each measure according to the precision provided by the API.
annotationsInclude separate annotation columns in the returned table. This parameter is currently broken and needs to be re-implemented
recode_zerosinterpret zero values as missings?
browse()open the dataset in a browser
sc_table_class$browse()
add_language()add a second language to the dataset
sc_table_class$add_language(language = NULL, key = NULL)
languagea language to add. "en" or "de".
keyan API key
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.