View source: R/ISRaD.extra.geospatial.keys.R
ISRaD.extra.geospatial.keys | R Documentation |
Recode numeric values from categorical geospatial data products
ISRaD.extra.geospatial.keys(database, geodata_keys)
database |
ISRaD dataset object |
geodata_keys |
directory where geospatial data are found |
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.
Updated ISRaD_extra object with recoded columns.
# 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")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.