Connecting SMSS to RStudio


I need assistance in connecting SMSS to RStudio. My professor provided instructions on how to import a database into RStudio using odbc and OBI . The code below is his steps provided.

con <- dbConnect(odbc::odbc(), Driver="SQL Server", Server = ".", Database = "AdventureWorks2016", Trusted_Connection="True")

I also attempted to access it via a Youtube tutorial using RODBC My professor doesn't understand why I'm erroring out (attached file) and my school's support desk is unable to assist as well.