Description Usage Arguments Value Examples
The class inherits all methods from a data frame, but has many fixed attributes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | indicator(
x,
shortcode,
indicator_name = NULL,
description,
date_created = NULL,
date_earliest = NULL,
date_latest = NULL,
original_source = NA_character_,
original_code = NA_character_,
keyword1,
keyword2,
keyword3,
keywords = NA_character_
)
is.indicator(x)
## S3 method for class 'indicator'
print(x, ...)
|
x |
A data.frame or tibble |
shortcode |
A short, unique, programatically usable indicator ID. |
indicator_name |
A unique name for the indicator. |
description |
A precise character string describing the indicator for the data catalogue of the data observatory. |
date_created |
The creation day or the refreshment day of the indicator. |
date_earliest |
The date of the earliest observation. Can be a numeric containing a year. |
date_latest |
The date of the latest observation. |
original_source |
Defaults to NA_character_. |
original_code |
The identifier in the original source, if applicable. |
keyword1 |
The first keywords, must be one of the pillars of the observatory. |
keyword2 |
The second keyword must be a topic within a pillar. |
keyword3 |
A search term within the topic. |
keywords |
A character vector of any optional, further keywords. |
A data.frame or tibble with indicator attributes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | test_indicator <- indicator (
x <- data.frame (
geo = rep(c("NL", "BE", "LU"), 4),
time = rep(c(2016:2019),3),
values = runif(12, 1,100)
),
shortcode = "observatory_test_1",
description = "A test indicator with random numbers",
date_created = as.Date ( "2020-08-24"),
date_earliest = min (x$time, na.rm=TRUE),
date_latest = max(x$time, na.rm=TRUE),
keyword1 = "test", keyword2 = "random", keyword3 = "Benelux"
)
## Only the first 10 observations are printed
print (test_indicator)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.