assemble.layers_data: Assemble Layers

Description Usage Arguments Value Examples

Description

Check all the input layers as defined by layers_navigation.csv, found in dir.layers and assembled out to a consolidated layers_data.csv for easy data extraction.

Usage

1
2
3
  assemble.layers_data(layers_navigation.csv,
    layers_data.csv, layers_id_fields, verbose = T,
    msg.indent = "  ")

Arguments

layers_navigation.csv

Full path to the layers_navigation.csv file.

dir.layers

Full path to the directory containing the layers files.

layers_data.csv

Combined data table output of all layers dir.layers based on descriptions in layers_navigation.

layers_id_fields

Character vector of unique identifiers typically spatial (eg region_id, country_id, saup_id).

Value

All of these parameters should be defined in config.R.

The check.layers_navigation() function iterates through the layers_navigation.csv and checks for the existence of all the input files and looks for matching fields. Any unused fields should be dealt with before moving onto using assemble.layers_data.

The assemble.layers_data() function reads in all data layers and combines them into a single data table layers_data.csv.

Examples

1
2
3
4
5
6
7
## Not run: 
  config.R = '~/ohi/scenarios/global_2012_nature/conf/config.R'
  source(config.R)
  check.layers_navigation(layers_navigation.csv, dir.layers, layers_id_fields)
  assemble.layers_data(layers_navigation.csv, dir.layers, layers_data.csv, layers_id_fields)

## End(Not run)

bbest/ohigui documentation built on May 11, 2019, 9:25 p.m.