Learn R Programming

iotables (version 0.9.4)

is_key_column_present: Check if a key column is present

Description

Tests whether the first column of a data frame contains either non-numeric values (default) or any of the potential_keywords supplied.

Usage

is_key_column_present(data_table, potential_keywords = NULL)

Value

A logical scalar: TRUE if the key column is valid, otherwise throws an error with a descriptive message.

Arguments

data_table

A data frame with a key column in its first position.

potential_keywords

Optional character vector of keywords expected in the key column. Defaults to NULL, in which case the function only asserts that the first column is not numeric.