headers_row {easyr}R Documentation

Identify headers row.

Description

Identify the row with headers in a data frame. It should NOT be used directly (that's why it isn't exported), but will be called by function [read.any] as necessary, with the applicable defaults set by that function.

Usage

headers_row(
  x,
  headers_on_row = NA,
  first_column_name = NA,
  field_name_map = NA
)

Arguments

x

Data frame to work with.

headers_on_row

The specific row with headers on it.

first_column_name

A known column(s) that can be used to find the header row. This is more flexible, but only used if headers_on_row is not available. If multiple are possible, use a vector argument here.

field_name_map

field_name_map from read.any.

Value

List with headers_already_column_names (TRUE/FALSE); headers_on_row (1-indexed number of the to match standard R indexing).


[Package easyr version 0.5-11 Index]