dataGen: Generate fake data from a rectangular tree plot

View source: R/dataGen.R

dataGenR Documentation

Generate fake data from a rectangular tree plot

Description

Generate fake data from a rectangular tree plot

Usage

dataGen(
  nplots = 5,
  min_stems = 200,
  max_stems = 500,
  min_diam = 5,
  max_diam = 100,
  plot_width = 100,
  plot_length = plot_width,
  species = LETTERS[1:20]
)

Arguments

nplots

number of plots

min_stems

minimum number of stems per plot

max_stems

maximum number of stems per plot

min_diam

minimum stem diameter

max_diam

maximum stem diameter

plot_width

plot width

plot_length

plot length

species

vector of species names from which to sample

Value

dataframe, where each row is a tree stem. Default of five plots, each with between 200 and 500 stems, from 20 species, with stem diameter values between 5 and 100. All trees have a single stem. Diameter values are drawn from a uniform distribution. Stem locations and species are randomly sampled, with repeats.

Examples

dat <- dataGen()
dat2 <- dataGen(nplots = 1, min_stems = 10, max_stems = 50, dbh_min = 10, 
  dbh_max = 200, plot_width = 20, plot_length = 50, 
  sp = c("Burkea africana", "Ochna pulchra"))


johngodlee/compInd documentation built on Aug. 5, 2024, 8:44 a.m.