powered by
Sample n rows from a disk.frame
# S3 method for disk.frame sample_frac(tbl, size = 1, replace = FALSE, weight = NULL, .env = NULL, ...)
a disk.frame
the proportion/fraction of rows to sample
TRUE to sample with replacement; FALSE to sample without replacement
weight of each row. NOT implemented
for compatibility
passed to dplyr
# NOT RUN { cars.df = as.disk.frame(cars) collect(sample_frac(cars.df, 0.5)) # clean up cars.df delete(cars.df) # }
Run the code above in your browser using DataLab