split_file: Split file every nlines

Description Usage Arguments Value Examples

View source: R/nlines-split.R

Description

Split file every nlines

Get files from splitting.

Usage

1
2
3
4
split_file(file, every_nlines, prefix_out = tempfile(),
  repeat_header = FALSE)

get_split_files(split_file_out)

Arguments

file

Path to file that you want to split.

every_nlines

Maximum number of lines in new file parts.

prefix_out

Prefix for created files. Default uses tempfile().

repeat_header

Whether to repeat the header row in each file. Default is FALSE.

split_file_out

Output of split_file.

Value

A list with

Vector of file paths created by split_file.

Examples

1
2
3
4
tmp <- fwrite2(iris)
infos <- split_file(tmp, 100)
str(infos)
get_split_files(infos)

bigreadr documentation built on Oct. 30, 2019, 12:12 p.m.