add_observation_status: Add observation status

Description Usage Arguments Details Examples

View source: R/data-wrangling-utils.R

Description

Adds the observation status A for values that are not missing and O for missing ones.

Usage

1

Arguments

dat

A data frame.

Details

The SDMX Code List for Observation Status differentiates O: Missing value and M: Missing value - data cannot exist. Differentiation must be made by the data curator, as it requires a knowledge of the cause of missingness.

Examples

1
2
3
4
5
6
7
8
9
{
add_observation_status(
  data.frame (
       time = rep(as.Date (paste0(2010:2020, "-01-01")),2),
       geo = c(rep("SE", 11), rep("FI", 11)),
       value = c(1:10, NA_real_, NA_real_, 2:11)
  )
)
}

dataobservatory-eu/dataobservatory documentation built on Jan. 7, 2022, 8:55 p.m.