Class definining all tables in twstats

twstats_table(name, title, source, columns, rowcount, data)

Arguments

name

A string uniquely naming the table, e.g. 'eurostat/tin00073/BE'.

title

A string title for the table

source

HTML-formatted string describing the source (usually with a link).

columns

A slash-separated string describing the columns in the table, e.g. 'year/country/value'.

Possible values are:

  1. year A column of years, e.g. 2008.

  2. country A column of country codes, e.g. IS, UK.

  3. value An arbitary numeric value. The data will have a more descriptive name, e.g. "Households".

  4. perc A percentage.

rowcount

Approximate power-of-ten rows the returned tables should have, e.g. 10, 100, 1000.

data

A function that returns a data.frame-like object matching the restrictions.

Value

A twstats object.