Description Usage Arguments Details Value Examples
This function reads a file in a specified format.
1 |
file |
file name (character or |
type |
data or file type |
... |
other arguments passed to the underlying function |
If type
is NULL
, the file type is inferred from
the file extension.
Use io_supported
to check support for a file or data type.
a data object (type depends on the underlying function)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
data(cars)
# write data to an RDS file
qwrite(cars, "cars.rds")
# infer output type based on the class of the cars object
qwrite(cars, "cars.dfm", type=NA)
# read data back in
x1 <- qread("cars.rds")
# specify the type explicitly
x3 <- qread("cars.dfm", type="data.frame")
# read all files (with extension) in current directory
xs <- qread(".", pattern="cars")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.