View source: R/density_estimates.R
One-dimensional numerical kernel density estimation based on
density
. This function abstacts away database
operations and provides sensible defauts for trimming out outlier
data, handling computational cost and handling special formats
(like Date fields).
1 2 3 |
tbl |
Table name |
cols |
Column name |
con |
Connection object to the database, or NULL for in-memory data.frames |
trim |
The quentile of data to be discarded from both ends (min and max) for robust estimation of the probability density |
adj |
Kernel width parameter to be passed to
|
discrete |
TRUE for integer-valued output |
n |
Default number of point for the kernel density estimation |
sample_max |
Maximum number of data points to read from the source table. Can be used to limit the data transfer from a database (and the consecutive memory consumption and computational costs) |
is_date |
Convert data first into Date before casting it into integers (where day 0 equals 1970-01-01) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.