get_density.Rd
This function calculates the density of a numeric vector, potentially
rescaling it to a specific range and reflecting it. it is a wrapper for
stats::density()
.
get_density(data_source, values_range, reflected = TRUE, ...)
Vector with numeric values
A numeric vector of length 2 specifying the range to rescale the data to. If missing, the range of the data is used.
Logical. Whether or not to reflect the data around 0? (from Density Estimation for Statistics and Data Analysis by B.W.Silverman)
Additional parameters used in stats::density
Data.frame with the data_source
values and estimated density+