Learn R Programming

CAWaR (version 0.0.2)

checkSamples: checkSamples

Description

checks if a shapefile with ground truth data contains all the necessary fields in the correct format.

Usage

checkSamples(x)

Arguments

x

An object or a list of class sp containing a data.frame (e.g. SpatialPolygonsDataFrame).

Value

A data.frame with the consistency checks for each element in x.

Details

Checks if a shapefile - or a list of - contains necessary columns and if these have the right format. It searches for:

  • sampler - Character vector with name of responsible person.

  • date - Date vector with the date on which each sample was collected (formatted as "yyyy-mm-dd").

  • label - Character vector sample label (e.g. land cover class).

See Also

labelCheck

Examples

Run this code
# NOT RUN {
{

require(fieldRS)

# Example ground-truth data
data(fieldData)

# check shapefile content
cs <- checkSamples(fieldData)
head(cs)

}
# }

Run the code above in your browser using DataLab