Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/normaldist-crossout.R
Crosses out days from abundance dataset(s) using a normal distribution
1 | normaldist.crossout(data, mean, sd, reduction = 1, DataCheck = TRUE)
|
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. |
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.
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)
normaldist.crossout(dat1, mean = mean(as.numeric(dat1$dates1)), sd = 2, reduction =8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.