Learn R Programming

Biolinv (version 0.1-3)

RPG: Generates random points within a geographic boundary.

Description

This function generates random points within a geographic area set as either sp::SpatialPolygons or raster::RasterLayer.

Usage

RPG(rpopn, boundary, year = "anyYear", SP)

Arguments

rpopn

total number of random points to be generated.

boundary

either a RasterLayer object (0: inside; >= 1: outside) or a SpatialPolygon(s) object.

year

year name (used by wrapper function simulacro() to lable consecutive time steps in its simulate time series).

SP

name of the species being simulated for labelling the output.

Value

data frame of random points.