randomgrid: randomgrid

View source: R/randomgrid.r

randomgridR Documentation

randomgrid

Description

Generates a random spatial sampling using a bivariate random uniform distribution.

Usage

randomgrid(
  n_samp = 1000,
  xmin = -100,
  xmax = 100,
  ymin = -100,
  ymax = 100,
  seed = 123456
)

Arguments

n_samp

number of sampling locations to output (default: 1000).

xmin

minimum x-axis coordinate (default: -100).

xmax

maximum x-axis coordinate (default: 100).

ymin

minimum y-axis coordinate (default: -100).

ymax

maximum y-axis coordinate (default: 100).

seed

integer, seed for randomization.

Value

data.frame object with x and y columns, with n_samp rows.

Author(s)

John L. Darcy

Examples

# library(specificity)
# g <- randomgrid()
# plot(g)
# g2 <- randomgrid(n_samp=50, xmin=0, ymin=0)
# plot(g2)


darcyj/specificity documentation built on Aug. 1, 2023, 8 a.m.