Learn R Programming

spoccutils (version 0.1.0)

clean: Clean spocc data

Description

Clean spocc data

Usage

clean(input)

Arguments

input
An object of class occdat

Value

  • Returns an object of class occdat+occlean. See attributes of the return object for details on cleaning results.

Details

We'll continue to add options for cleaning data, but for now, this function:

  • Removes impossible values of latitude and longitude
  • Removes any NA values of latitude and longitude
  • Removes points at 0,0 - these points are likely wrong

Examples

Run this code
library("spocc")
res <- occ(query = c('Ursus','Accipiter','Rubus'), from = 'bison', limit=10)
class(res)
res_cleaned <- clean(input=res)
class(res_cleaned) # now with classes occdat and occclean

Run the code above in your browser using DataLab