betadist.crossout: Crosses out days from abundance dataset(s) using a beta...

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

View source: R/betadist-crossout.R

Description

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

Usage

1
2
betadist.crossout(data, shape1 = 1, shape2 = 10,
  start = as.Date("2017-01-01"), end, reduction = 1, DataCheck = TRUE)

Arguments

data

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

shape1

numeric; the shape1 parameter of the beta distribution.

shape2

numeric; the shape2 parameter of the beta distribution.

start

date object; determines the start date of the beta distribution.

end

date object; determines the end date of the beta distribution. If left out it will be start + 130 days.

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 beta distribution, with the parameters shape1, shape2, start (start date of the beta distribution) and end (end date of beta distribution). 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)
 
 betadist.crossout(dat1, shape1 = 1, shape2 = 4, start = min(dat1$dates1), end = max(dat1$dates1), reduction = 10)

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