convertKeyedData: Convert data tables

Description Usage Arguments Value Examples

Description

This function converts a set of data tables from a specified format to a keyed format including renaming variables.

Usage

1
2
convertKeyedData(data.ls, key.df, returnFormat = c("3Table", "long",
  "wide")[1])

Arguments

data.ls

list containing the data tables specified in the key

key.df

the key or look-up table that converts one formate to another

returnFormat

string identifying the return type, can be either "long", "wide", or "3Table"

Value

a data frame of one of three formats: a long table, wide table, or 3 data tables specifying the sample, field, and study data

Examples

1
2
3
4
5
6
7
## Not run: 
rawData <- readCanandaUplandForest2018() #~7Mb
longData <- convertKeyedData(rawData, rawData$ISCN5_key, returnFormat = 'long') #~50Mb
wideData <- convertKeyedData(rawData, rawData$ISCN5_key, returnFormat = 'wide') #~7Mb
3TableData <- convertKeyedData(rawData, rawData$ISCN5_key, returnFormat = '3Table') #~9Mb

## End(Not run)

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