melt_delim_chunked | R Documentation |
For certain non-rectangular data formats, it can be useful to parse the data into a melted format where each row represents a single token.
melt_delim_chunked(
file,
callback,
chunk_size = 10000,
delim,
quote = "\"",
escape_backslash = FALSE,
escape_double = TRUE,
locale = default_locale(),
na = c("", "NA"),
quoted_na = TRUE,
comment = "",
trim_ws = FALSE,
skip = 0,
progress = show_progress(),
skip_empty_rows = FALSE
)
melt_csv_chunked(
file,
callback,
chunk_size = 10000,
locale = default_locale(),
na = c("", "NA"),
quoted_na = TRUE,
quote = "\"",
comment = "",
trim_ws = TRUE,
skip = 0,
progress = show_progress(),
skip_empty_rows = FALSE
)
melt_csv2_chunked(
file,
callback,
chunk_size = 10000,
locale = default_locale(),
na = c("", "NA"),
quoted_na = TRUE,
quote = "\"",
comment = "",
trim_ws = TRUE,
skip = 0,
progress = show_progress(),
skip_empty_rows = FALSE
)
melt_tsv_chunked(
file,
callback,
chunk_size = 10000,
locale = default_locale(),
na = c("", "NA"),
quoted_na = TRUE,
quote = "\"",
comment = "",
trim_ws = TRUE,
skip = 0,
progress = show_progress(),
skip_empty_rows = FALSE
)
melt_delim_chunked()
and the specialisations melt_csv_chunked()
,
melt_csv2_chunked()
and melt_tsv_chunked()
read files by a chunk of rows
at a time, executing a given function on one chunk before reading the next.
Other chunked:
callback
,
read_delim_chunked()
,
read_lines_chunked()
# Cars with 3 gears
f <- function(x, pos) subset(x, data_type == "integer")
melt_csv_chunked(readr_example("mtcars.csv"), DataFrameCallback$new(f), chunk_size = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.