processFile: Convert a given output csv file to a shapefile.

Description Usage Arguments

View source: R/process.R

Description

Process a fiven csv and convert it to a shapefile.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
processFile(
  shapefile,
  csvfile,
  description,
  outputfile = NULL,
  convertList = NULL,
  aggregate = sum,
  ignore = NULL,
  toAggregate = NULL
)

Arguments

shapefile

Name of the input shapefile. This file must be created using getCR, getLU, or getSimU.

csvfile

l The output csv file to be exported.

description

A vector of strings with the attribute names. It is possible to use attrs() to help creating this description.

outputfile

Name of the shapefile to be saved.

convertList

A list whose indexes are attribute values from the csv file and whose values are going to replace the attribute values from the csv file. Both attributes and values must be string.

aggregate

A function to be used to join values with the same ID and attributes to be joinded. As default, it will use sum, but it is possible to use functions such as average.

ignore

A vector of attributes to be ignored. For example, when processing the whole World, usually there is a column with the country name, which is not unique and therefore it will not be ignored as default. Such attribute must be included in this argument to avoid creating one attribute for each country. Default is NULL.

toAggregate

Attributes to be used only to aggregate, ignoring their values in the created attribute names.


pedro-andrade-inpe/colrow documentation built on Dec. 17, 2020, 11:21 p.m.