Learn R Programming

febr (version 1.0.1)

febr2spdf: Create an object of class SpatialPointsDataFrame

Description

Set spatial coordinates and projection attributes to create an object of class SpatialPointsDataFrame from the observation ("observacao") table of one or more standardized datasets contained in the Free Brazilian Repository for Open Soil Data -- febr, http://www.ufsm.br/febr.

Usage

febr2spdf(obj)

Arguments

obj

Object of class data.frame downloaded from febr using function observation.

Value

An object of class SpatialPointsDataFrame

Examples

Run this code
# NOT RUN {
library(magrittr)
observation(dataset = "ctb0003", variable = "taxon",
            progress = FALSE, verbose = FALSE) %>% 
  febr2spdf() %>%
  sp::spplot(zcol = "taxon_sibcs_2009", auto.key = list(columns = 3), scales = list(draw = TRUE))
# }

Run the code above in your browser using DataLab