| sample_frac.disk.frame {disk.frame} | R Documentation |
Sample n rows from a disk.frame
## S3 method for class 'disk.frame' sample_frac(tbl, size = 1, replace = FALSE, weight = NULL, .env = NULL, ...)
tbl |
tbl of data. |
size |
For |
replace |
Sample with or without replacement? |
weight |
Sampling weights. This must evaluate to a vector of non-negative numbers the same length as the input. Weights are automatically standardised to sum to 1. This argument is automatically quoted and later
evaluated in the context of the data
frame. It supports unquoting. See
|
.env |
This variable is deprecated and no longer has any
effect. To evaluate |
... |
ignored |
cars.df = as.disk.frame(cars) collect(sample_frac(cars.df, 0.5)) # clean up cars.df delete(cars.df)