loadLandscape: Wrapper function : loadLandscape

Description Usage Arguments Value Examples

View source: R/Landscape_Methods.R

Description

Wrapper function to create a Landscape object using SpatialPolygons and dataframe. The SpatialPolygons object and the data.frame have to contain the same number of polygons and row (row ID is polygons ID).

Usage

1

Arguments

sp

a SpatialPolygons object designing the landscape

data

a data.frame containing fields (polygons) information. Row names as fields ID, column names as sources | neutral | receptors (for a given field, the value is 1 for the type of the field (source or neutral or receptor), otherwise 0).

Value

A SpatialPolygonsDataFrame object

Examples

1
2
3
4
data(maize_65)
maize_data <- maize_65@data
maize_sp_only <- maize_65 ; maize_sp_only@data = data.frame(remove = rep(0,nrow(maize_65@data)))
load_landscape <- loadLandscape(maize_sp_only, maize_data)

briskaR documentation built on Dec. 11, 2021, 9:23 a.m.