A database resource that is accessible through the Open Database Connectivity ('ODBC') API. This package uses the Resource
model, with URL "resolver" and "client", to dynamically discover and make accessible tables stored in a 'MS SQL Server' database.
For more details see Marcon (2021)
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.