Skip to contents

Resolve kernel order s

Usage

score_order(score, n, data, ctx = NULL)

Arguments

score

ustat_score

n

integer sample size

data

data used by the score (for dynamic orders)

ctx

optional context

Value

integer order s

Examples

sc <- new_score(
  name = "dyn",
  order = function(n, data, ctx) if (n > 5) 3L else 2L,
  eval = function(idxs, data, ctx, rng) sum(data[idxs])
)
score_order(sc, 4L, 1:4, NULL)
#> [1] 2