SimulatePlots: Draw n samples from data with elements in a cartesian...

Description Usage Arguments Value Details Examples

Description

Draw n samples from data with elements in a cartesian coordinate system

Usage

1
2
3
4
SimulatePlots(plotdata, nsamples, dimx = NULL, dimy = NULL, nsims,
  xname = "gx", yname = "gy", species = "species", family = "family",
  biomass = "biomass", shape = c("rectangle", "circle"), size = c(5, 5),
  distance = 0, maxiter = 10^5)

Arguments

plotdata

a data frame with a forest plot census data.

nsamples

numeric value. The number of sample units.

dimx

numeric vector with two positions minimum and maximum value of the x coordinate.

dimy

numeric vector with two positions minimum maximum value of the y coordinate.

nsims

numeric value. The number of simulations.

xname

character string with the name of the x coordinate variable.

yname

character string with the name of the y coordinate variable.

species

character string with the name of the species variable.

family

character string with the name of the family variable.

biomass

character string with the name of the biomass variable.

shape

a character string. Two shapes are possible: "rectangle" and "circle"

size

numeric vector. For ”rectangle” the dimension of x and y sidesand for ”circle” the radius size.

distance

numeric value. The minimum distance among plots

maxiter

numeric value. indicating the maximum number of trails to sample units without overlaping.

Value

a data frame with the same columns as plotdata plus a 'sample' representing the sample unit number that the element are in.

Details

Draw sample from elements in a cartesian coordinate system and return the subset of data in the sample.

Examples

1
2
3
4
5
## Not run: 
data(bci7)
plotData <- RSamplePlots(bci7, nsamples = 100, shape = "circle", size = 10)

## End(Not run)

vitorpaciello/Rsampleplot documentation built on May 15, 2019, 3:21 p.m.