connection_close: Close a connection

Description Usage Arguments Value Examples

View source: R/connection_close.R

Description

Close a connection

Usage

1
connection_close(con, host = "", type = "", leave_open = FALSE)

Arguments

con

Connection variable

host

Host name of the connection. Optional, defaults to empty

type

Type of connection. Optional, defaults to empty

leave_open

Should the connection be left open. Defaults to FALSE

Value

Returns a NULL object. If using the RStudio IDE, it will attempt to close the connection identified by the 'host' and 'type' arguments, or the con object

Examples

1
2
3
4
library(DBI)
con <- connection_open(RSQLite::SQLite(), path = ":dbname:")
connection_close(con)
con

edgararuiz/connections documentation built on Oct. 6, 2021, 8:48 a.m.