emr_track.percentile {naryn} | R Documentation |
Returns track percentile of the values
Description
Returns track percentile of the values.
Usage
emr_track.percentile(track, val, lower = TRUE)
Arguments
track |
track name |
val |
vector of values |
lower |
how to calculate percentiles |
Details
This function returns the percentiles of the values given in 'val' based on track data.
If 'lower' is 'TRUE' percentile indicates the relative number of track values lower than 'val'. If 'lower' is 'FALSE' percentile reflects the relative number of track values lower or equal than 'val'.
Value
A vector of percentile values
See Also
Examples
emr_db.init_examples()
# percentiles of 30, 50
emr_track.percentile("dense_track", c(30, 50))
# calculate percentiles of track's earliest values in time window
emr_vtrack.create("v1",
src = "dense_track", func = "earliest",
time.shift = c(-5, 5)
)
emr_extract(
c(
"dense_track",
"emr_track.percentile(\"dense_track\", v1, FALSE)"
),
keepref = TRUE, names = c("col1", "col2")
)
[Package naryn version 2.6.26 Index]