normaldist.crossout: Crosses out days from abundance dataset(s) using a normal...

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

View source: R/normaldist-crossout.R

Description

Crosses out days from abundance dataset(s) using a normal distribution

Usage

1
normaldist.crossout(data, mean, sd, reduction = 1, DataCheck = TRUE)

Arguments

data

data.frame; an abundance dataset, with one column of date objects, and one column numeric values.

mean

numeric; the mean of the normal distribution. Number of days after the 01.01.1970

sd

numeric; the standard deviation of the normal distribution.

reduction

numeric; Determines how many 'observations' shall be excluded.

CheckData

logical; If TRUE the CheckData() function will be runned in advance. If FALSE the columns of data1 (and possibly data2) must be named Date and Count.

Details

this function will reduce the number of observation in this dataset by one on a day, that is determined by a normal distribution, with the parameters mean and sd. if reduction is more than one, then there are several days determined.

Value

A data.frame like data, but with excluded Observations.

Author(s)

Florian Berger <florian_berger@ymail.com>

See Also

scale

Examples

1
2
3
4
5
6
7
#Create Datasets
 a     <- c(1:10)
 dates1 <- as.Date(a, origin = '2017-01-01')
 count1 <- c(1,1,3,4,6,9,5,4,2,1)
 dat1   <- data.frame(dates1, count1)
 
 normaldist.crossout(dat1, mean = mean(as.numeric(dat1$dates1)), sd = 2, reduction =8)

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