File: classify-intervals.R

package info (click to toggle)
r-cran-classint 0.4-9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 316 kB
  • sloc: fortran: 65; sh: 13; ansic: 13; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 902 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 2022-06-06 Josiah Parry
# Wrapper function to return intervals as either integer or factor. 
# Executes findCols(classIntervals(...), factor = factor)
classify_intervals <- function(var, n, style = "quantile", rtimes = 3, ...,
                               intervalClosure = c("left", "right"), dataPrecision = NULL,
                               warnSmallN = TRUE, warnLargeN = TRUE, largeN = 3000L, 
                               samp_prop = 0.1,
                               gr = c("[", "]"),
                               factor = TRUE) {
  clI <- classIntervals(
    var = var,
    n = n, 
    style = style,
    rtimes = rtimes, 
    ...,
    intervalClosure = intervalClosure,
    dataPrecision = dataPrecision,
    warnSmallN = warnSmallN,
    warnLargeN = warnLargeN, 
    largeN = largeN,
    samp_prop = samp_prop,
    gr = gr)
  
  findCols(clI, factor = factor)
}