ISRaD.extra.geospatial.keys: ISRaD.extra.geospatial.keys

View source: R/ISRaD.extra.geospatial.keys.R

ISRaD.extra.geospatial.keysR Documentation

ISRaD.extra.geospatial.keys

Description

Recode numeric values from categorical geospatial data products

Usage

ISRaD.extra.geospatial.keys(database, geodata_keys)

Arguments

database

ISRaD dataset object

geodata_keys

directory where geospatial data are found

Details

Generic function that reads .csv files paired with categorical raster data and recodes extracted data in the ISRaD_extra object. For the function to work, the .csv filenames must be identical to the corresponding raster filenames (except for the file extension). Additionally, the first column of the .csv file must contain the numeric identifier and the remaining column/s the corresponding character value/s.

Value

Updated ISRaD_extra object with recoded columns.

Examples


# Load example dataset Gaudinski_2001
database <- ISRaD::Gaudinski_2001
# Fill profile coordinates
database <- ISRaD.extra.fill_coords(database)
# Fill geospatial data
database.x <- ISRaD.extra.geospatial(database,
  geodata_directory = system.file("extdata", "geodata_directory", package = "ISRaD")
)
# Recode numeric data to categorical
database.x <- ISRaD.extra.geospatial.keys(database.x,
  geodata_keys = system.file("extdata", "geodata_keys", package = "ISRaD")
)



ISRaD documentation built on Sept. 21, 2023, 9:06 a.m.