Connecting SMSS to RStudio

Hello,

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.

library(odbc)
library(odbi)
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 https://www.youtube.com/watch?v=PoA23UWvXuc. My professor doesn't understand why I'm erroring out (attached file) and my school's support desk is unable to assist as well.