CleanAttrTable: Clean attribute tables written from ArcGIS.

Description Usage Arguments Value Examples

Description

The function will remove commas used as thousand seperator, re-arrange columns and add missing ones. The attribute table should contain (as a minimum):

Usage

1
CleanAttrTable(AttrTable, Soiltype = TRUE)

Arguments

AttrTable

data.table An attribute table containing at least the tree columns: COUNT, LINK & VALUE

Soiltype

Logical. Should the output contain dummy variable for soiltype?

Value

A clean version of the attribute table with the correct dimension for use in ALMaSS.

Examples

1
2
3
4
5
6
data(polyref)
str(polyref)
tail(polyref)  # Note the issues with commas
poly2 = CleanAttrTable(polyref)
str(poly2)  # Only the three needed columns and in the right order
tail(poly2)  # Comma issue gone

LDalby/ralmass documentation built on May 8, 2019, 5:48 p.m.