RandRec {GeoRange}R Documentation

Function to randomly generate points within a given rectangular shaped distribution

Description

Function to randomly generate points within a given rectangular shaped distribution

Usage

RandRec(RecShape, npts = 100)

Arguments

RecShape

- The outline of a rectangular distribution output from the EqualAreaRectangle() function

npts

- The number of randomly generated points within the rectangular shape

Value

Returns a 2-dimensional array of decimal degree coordinates within a rectangular shape

Note

Function currently does not take acount of the decreasing surface area moving toward the poles so points closer to the poles will be overrepresented relative to the actual surface area they represent

Examples

HorseShoeTest<-PtsAlgHorseShoe(z=2000,spacing=1,endAngles=c(-90,90))
HorseShoePts<-RandHorseShoe(center=c(0,0),npts=100,HorseShoeShape=HorseShoeTest)
RecOutline<-EqualAreaRectangle(TargetArea=as.numeric(HorseShoePts$TotalArea_km2),error=0.001)
RandRec(RecShape=RecOutline,npts=100)

[Package GeoRange version 0.1.0 Index]