Connections which close themselves
R file connections which are automatically closed.
with_connection(con, code) local_connection(con, .local_envir = parent.frame())
con |
For |
code |
|
.local_envir |
|
[any]
The results of the evaluation of the code
argument.
withr
for examples
with_connection(list(con = file("foo", "w")), { writeLines(c("foo", "bar"), con) }) read_foo <- function() { readLines(local_connection(file("foo", "r"))) } read_foo() unlink("foo")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.