loadLandscape {briskaR}R Documentation

Wrapper function : loadLandscape

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

loadLandscape(sp, data)

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

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)


[Package briskaR version 1.0.3 Index]