This is a database connection sample:
library(RODBC)
dbhandle <- odbcDriverConnect('driver={SQL Server};server=SERVERNAME;database=DW;trusted_connection=true')
res <- sqlQuery(dbhandle, 'select * from DW.DBO.Vehicle ')
head(res)
Scripts, Articles, Relevant for DBAs, Consultants, BI, Data Scientists and Developers