Draw a random sample of rows (with or without replacement) from a Spark DataFrame.

sdf_sample(x, fraction = 1, replacement = TRUE, seed = NULL)

Arguments

x

An object coercable to a Spark DataFrame.

fraction

The fraction to sample.

replacement

Boolean; sample with replacement?

seed

An (optional) integer seed.

See also