Learn R Programming

searchAnalyzeR (version 0.1.0)

stream_file: Stream Process Large Files

Description

Stream Process Large Files

Usage

stream_file(
  file_path,
  process_fn,
  chunk_size = 10000,
  skip = 0,
  max_lines = NULL,
  progress = TRUE
)

Value

Result of processing

Arguments

file_path

Path to the file to process

process_fn

Function to process each chunk/line

chunk_size

Number of lines to read at once

skip

Number of lines to skip at beginning of file

max_lines

Maximum number of lines to process (NULL = all)

progress

Logical, whether to show progress