process_df_chunked: Apply a function to a data frame in chunks

View source: R/chunked.R

process_df_chunkedR Documentation

Apply a function to a data frame in chunks

Description

If applying a function to a data frame that take a long time, this function may help to estimate the total processing duration.

Usage

process_df_chunked(df, callback, chunk_size = 100, progress = TRUE, ...)

Arguments

df

data frame

callback

A callback function to call on each chunk

chunk_size

The number of rows to include in each chunk

progress

bool. Display a progress message stating time taken after each chunk is processed.

...

additional arguments passed on to callback function.

Value

a dataframe


rmgpanw/rawutil documentation built on May 20, 2022, 1:29 a.m.