vfile | R Documentation |
Create a custom file connection
vfile(description, open = "", verbosity = 1)
description |
path to a filename; contrary to |
open |
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: 1.
Set to |
This vfile()
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, vfile(tmp))
readBin(vfile(tmp), raw(), 1000)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.