powered by
Computes the recommended number of chunks to break a data.frame into. It can accept filesizes in bytes (as integer) or a data.frame
recommend_nchunks(df, type = "csv", minchunks = parallel::detectCores(logical = FALSE), conservatism = 2)
a disk.frame or the file size in bytes of a CSV file holding the data
only = "csv" is supported. It indicates the file type corresponding to file size `df`
the minimum number of chunks. Defaults to the number of CPU cores (without hyper-threading)
a multiplier to the recommended number of chunks. The more chunks the smaller the chunk size and more likely that each chunk can fit into RAM
# NOT RUN { # recommend nchunks based on data.frame recommend_nchunks(cars) # recommend nchunks based on file size ONLY CSV is implemented at the moment recommend_nchunks(1024^3) # }
Run the code above in your browser using DataLab