CheckProbData: checks input data for EstimatorData() Function

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

View source: R/CheckProbData.R

Description

checks input data if it fits the requirenments of the EstimatorData() Function

Usage

1
CheckProbData(data, Interpolate = TRUE)

Arguments

data

list; list as returned by the functions: kernelest() and normalize().

interpolate

logical; determines whether data should be interpolated later on or not. Will run additional Checks if TRUE.

Details

This function checks if given data fits the requirenments for the EstimatorData() function. It will return a list with the given dataframe, startpoint and endpoint (if those don't exist it will take their minimum and maximum values) As it checks the data, no specific input is needed, but it will only return if its a data frame with two rows (one that contains only dates the other only numeric) and when there is a row for every day in between the start and the enddate, and if those don't exist between the first and the last x-value. Makes an Object usable for EstimatorData() Function.

Value

list; with the levels: x = the dates in the inup data.frame, y = the corresponding probability densities, startpoint = (if not declared in input list) minimum of dates in input data.frame, endpoint = (if not declared in input list) maximum of dates in input data.frame.

Author(s)

Florian Berger <florian_berger@ymail.com>

See Also

scale

Examples

1
2
3
4
5
a     <- c(1:10)
dates <- as.Date(a, origin = '2017-01-01')
count <- c(1,1,3,4,6,9,5,4,2,1)
dat   <- data.frame(dates, count)
pdf   <- CheckProbData(kernelest(dat))

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