core_twstats_table.Rd
Main functions for searching and retrieving tables
twstats_get_table(required_name) twstats_find_tables( required_columns = NULL, required_rowcount = NULL, previous_tables = c())
required_name | Name of the table you want to read, e.g. |
---|---|
required_columns | Column types your table should have, wildcards allowed, e.g. |
required_rowcount | Approximate power-of-ten rows the returned tables should have, e.g. |
previous_tables | Character vector of already-known tables, filtered from results, e.g. |
Find and retrieve data from twstats.
twstats_get_table
returns a twstats_table
object, or an error if nothing can be found.
twstats_find_tables
returns a character vector of all matching table names.
# NOT RUN { # Find all tables with per-country data table_names <- twstats_find_tables('country/value') # Get a twstats table, extract the title and data tbl <- twstats_get_table('eurostat/tin00073/country:BE') title <- tbl$title df <- tbl$data() # }