ODBC Resource R

R-CMD-check CRAN_Status_Badge

The odbc.resourcer package is for accessing databases implementing the ODBC API.

For a MS SQL server database, the resource object would be:

library(odbc.resourcer)
# Create a resource
res <- resourcer::newResource(url = "odbc+mssql://localhost:1433/EpidemiologyDB/PatientData", identity = "sa", secret = "YourStrong@Password123")
# Create a resource client
client <- resourcer::newResourceClient(res)
# Coerce resource to a data frame
df <- client$asDataFrame()
# Disconnect the client
client$close()

The package is built on top of the odbc package and the DBI package.