Description Usage Arguments Examples
Process the input file a batch of one batch
1 2 3 4 |
filename |
Filename need to process |
batch_lines |
Batch lines to process the data, default 10000000 |
handler |
The function to process the data |
param_names |
Hander function required parameter names |
extra_fread_params |
Extra fread parameters in read data step, default is list(sep = '\n', header = TRUE, return_1L = TRUE), return_1L to get x[[1L]] |
extra_params |
Extra paramemters pass to handler function |
start_index |
default is 1, control the skip rows, n = (i-1) * batch_lines |
1 2 3 4 5 6 7 | dat <- data.frame(a=1:100, b=1:100)
filename <- tempfile()
write.table(dat, filename, sep = '\t', row.names = FALSE, quote = FALSE)
handler_fun <- function(x, i = 1) {
return(x[i])
}
batch_file(filename, 10, handler_fun)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.