flag_frequency: Flag aggregation by the frequency count method

Description Usage Arguments Value Examples

Description

Flag aggregation by the frequency count method

Usage

1

Arguments

f

A vector of flags containing the flags of a series for a given period.

Value

flag_frequency returns a character with a single character flag in case the highest frequency count is unique, or multiple character in case there are several flags with the highest frequency count.

Examples

1
2
3
4
5
6
7
flag_frequency(c("pe","b","p","p","u","e","d"))
flag_frequency(c("pe","b","p","p","eu","e","d"))


flags <- tidyr::spread(test_data[, c(1:3)], key = time, value = flags)
flag_frequency(flags[,5])
apply(flags[, c(2:ncol(flags))],2, flag_frequency)

eurostat/flagr documentation built on May 26, 2019, 4:39 p.m.