processFile | R Documentation |
Process a fiven csv and convert it to a shapefile.
processFile(
shapefile,
csvfile,
description,
outputfile = NULL,
convertList = NULL,
aggregate = sum,
ignore = NULL,
toAggregate = NULL
)
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.