NormData: Creates abundance dataset

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/NormData.R

Description

Creates abundance dataset from a normal distribution

Usage

1

Arguments

mean

numeric; Mean for the underlying normal distribution, will be interpreted as difference of days from the 01-01-2017

sd

numeric; standard deviation of the underlying normal distribution.

n

numeric, whole number; number of drawings to be done from the normal distribution, also the number of observations in the whole dataset.

FillUp

logical; If TRUE not specified datapoints will be filled with 0.

Details

This function will create an abundance dataset, a data.frame, with two columns, one called dates and one called count. It will get n realizations of a normal distributions with the parameters given by mean and sd. It will round those to whole numbers and convert them into dates, by treating these realizations as differences from the 2017-01-01. If fillup = TRUE it will fillup the dates that are in between the minimum and maximum of the dates, and give count values of zero for those days.

Value

a dataframe with two columns; one with date objects, one with the number of observations on the respective dates.

Author(s)

Florian Berger <florian_berger@ymail.com>

See Also

scale

Examples

1
2
3
dat  <- NormData(mean = 0, sd = 5, n = 1000, FillUp = TRUE)
func <- as.function(estdist(dat))
curve(func, from = min(dat$Date), to = max(dat$Date))

biometry/phenologicalOverlap documentation built on May 21, 2019, 2:31 a.m.