vfs_file | R Documentation |
Create a custom file connection
vfs_file(description, mode = "", verbosity = 0L)
description |
path to a filename; contrary to |
mode |
character string. A description of how to open the connection
if it is to be opened upon creation e.g. "rb". Default "" (empty string)
means to not open the connection on creation - user must still call
|
verbosity |
integer value 0, 1, or 2. Default: 0.
Set to |
This vfs_file()
connection works like the file()
connection
in R itself.
This connection works with both ASCII and binary data, e.g. using
readLines()
and readBin()
.
## Not run:
tmp <- tempfile()
dat <- as.raw(1:255)
writeBin(dat, vfs_file(tmp))
readBin(vfs_file(tmp), raw(), 1000)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.