change_data: Change the data of a Spatial*DataFrame object.

Description Usage Arguments Value Examples

View source: R/change_data.R

Description

The aim of this function is to propose an alternative to the bug reported here.

Usage

1
change_data(spdf, df)

Arguments

spdf

A Spatial*DataFrame object.

df

A data frame.

Value

An object of the same class as spdf.

Examples

1
2
3
4
# the working direction
vn <- sptools::gadm("vietnam", "sp", 1, intlib = TRUE, save = TRUE)
vn
change_data(vn, data.frame(gaussian = rnorm(63), uniform = runif(63)))

choisy/sptools documentation built on Aug. 22, 2019, 12:57 p.m.