powered by
Split file every nlines
Get files from splitting.
split_file(file, every_nlines, prefix_out = tempfile(), repeat_header = FALSE)get_split_files(split_file_out)
get_split_files(split_file_out)
A list with
name_in: input parameter file,
name_in
file
prefix_out: input parameter `prefix_out``,
prefix_out
nfiles: Number of files (parts) created,
nfiles
nlines_part: input parameter every_nlines,
nlines_part
every_nlines
nlines_all: total number of lines of file.
nlines_all
Vector of file paths created by split_file.
Path to file that you want to split.
Maximum number of lines in new file parts.
Prefix for created files. Default uses tempfile().
tempfile()
Whether to repeat the header row in each file. Default is FALSE.
FALSE
Output of split_file.
tmp <- fwrite2(iris) infos <- split_file(tmp, 100) str(infos) get_split_files(infos)
Run the code above in your browser using DataLab