format_stream {mrgsim.parallel} | R Documentation |
Set the format for a stream_file object
Description
The format is set on the file objects inside the list so that the file
object can be used to call a write method. See write_stream()
.
Usage
format_stream(
x,
type = c("fst", "feather", "qs", "rds"),
set_ext = TRUE,
warn = FALSE
)
Arguments
x |
A |
type |
The file format type; if |
set_ext |
If |
warn |
If |
Value
x
is returned with a new class attribute reflecting the expected output
format (fst
, feather
(arrow), qs
or rds
).
See Also
format_is_set()
, locate_stream()
, ext_stream()
,
new_stream()
, file_stream()
, file_set()
Examples
fs <- new_stream(2)
fs <- format_stream(fs, "fst")
fs[[1]]
format_is_set(fs[[1]])
[Package mrgsim.parallel version 0.2.1 Index]