Package-level declarations

Sampling options.

Used as a value of the sampling parameter in geom_xyz() functions.

val n = 100
val m = 5
val rand = java.util.Random(42)
val data = mapOf("x" to List(n) { rand.nextInt(m) })
letsPlot(data) +
geomBar(sampling = samplingRandomStratified(3, seed=42)) { x="x" }

For more information, see sampling.html.

Examples

Properties

Link copied to clipboard
val samplingNone: <Error class: unknown class>

Functions

Link copied to clipboard
fun samplingGroupRandom(n: Int, seed: Int? = null): SamplingOptions
Link copied to clipboard
fun samplingGroupSystematic(n: Int): SamplingOptions
Link copied to clipboard
fun samplingPick(n: Int): SamplingOptions
Link copied to clipboard
fun samplingRandom(n: Int, seed: Int? = null): SamplingOptions

Returns a subset of randomly selected items.

Link copied to clipboard
fun samplingRandomStratified(n: Int, seed: Int? = null, minSubsample: Int? = null): SamplingOptions

Randomly sample from each stratum (subgroup).

Link copied to clipboard
fun samplingSystematic(n: Int): SamplingOptions
Link copied to clipboard
fun samplingVertexDP(n: Int): SamplingOptions
Link copied to clipboard
fun samplingVertexVW(n: Int): SamplingOptions