Description Usage Arguments See Also Examples
A with
method for connection objects
which closes the connection after evaluation.
This is modelled after the common python idiom.
1 2 | ## S3 method for class 'connection'
with(connection, expr)
|
connection |
a connection, such as a file
connection created with |
expr |
expression to evaluate |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
connection <- file("file.csv", "r")
with(connection, {
print(connection)
})
isOpen(connection)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.