readKeyedData: Simple read-in for small datasets

Description Usage Arguments Value

Description

This function will read in a generic data file and convert it a long data table and a wide data table with the assistance of a key. This is intended for relatively small data sets, if your data is more then 10K layers (with an expected data load >10Mb) consider writing your own function.

Usage

1
2
3
4
readKeyedData(filename = NA, key.df = NA,
  verticalTable = c("metadata"),
  excludeSheets = c("controlled vocabulary"), skipRows = 0,
  dropRows = NA, verbose = FALSE)

Arguments

filename

characters identifying an Excel file with worksheets or set of csv files to be read in

key.df

data frame converting headers to variables.

verticalTable

a list of sheets or file names with data by column instead of by row. Typically this is metadata where a single entry is expected.

excludeSheets

list of sheets in Excel workbook not to read in

skipRows

the rows (or columns) to skip because they are human readable descriptions or units. The header will be read as being after these rows.

dropRows

rows to be dropped after the data is read in. Typically these are descritions below the headers.

verbose

a flag to print out helpful statements

Value

a list of a wide and long data tables with a copy of the final key


ktoddbrown/soilDataR documentation built on May 30, 2019, 9:56 p.m.