check_wide_format {countries}R Documentation

Check for wide country data formats

Description

The function looks for country names or year information in the column names. This function is designed for simple panel country data, in which countries' time series are arranged side by side on columns or stacked on rows. The function will only return year/country column names if at least 3 country/year column names are detected.

Usage

check_wide_format(x, adjacency = TRUE)

Arguments

x

A dataframe

adjacency

Logical value indicating whether column names containing country or year information need to be adjacent to each other. Default is TRUE

Value

Returns a data.frame identifying the columns names that contain country or year information.

See Also

find_keycol, find_countrycol, find_timecol

Examples

example <- data.frame(Year=2000:2010, China=0:10, US=10:20, Vietnam=30:40)
check_wide_format(x=example)

[Package countries version 1.2.0 Index]