Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/CheckProbData.R
checks input data if it fits the requirenments of the EstimatorData() Function
1 | CheckProbData(data, Interpolate = TRUE)
|
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. |
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.
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.
Florian Berger <florian_berger@ymail.com>
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.