inst/extdata/filterSpecies.R

library(digest)
library(uuid)

# Read in species observation data
speciesData <- read.csv(system.file("extdata/sample.csv", package="dataone"))

# Very simple filter to extract only the species of interest
speciesData <- speciesData[speciesData$species=="MUSS",]
outfile <- tempfile(pattern="filteredSpecies", fileext=".csv")
write.csv(speciesData, file=outfile, row.names=FALSE)

Try the dataone package in your browser

Any scripts or data that you put into this service are public.

dataone documentation built on June 11, 2022, 1:06 a.m.