Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/betadist-crossout.R
Crosses out days from abundance dataset(s) using a beta distribution
1 2 |
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. |
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.
A data.frame like data, but with excluded Observations.
Florian Berger <florian_berger@ymail.com>
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.