I have worked with RODBC before and you should be able to do just this. Some steps for you to follow based on my experience:
- Set up the queries that you need in your access database.
- Set up the ODBC connection on your PC to the access database.
- Write the R script that will use the RODBC package to connect to the access database (via the ODBC connection from 2) and execute the scripts that you set up in point 1 above.
You can dispense with point 1 above if you want to hardcode the sql in the R script (similar to the python example you gave). From my experience, it's usually more robust to write your SQL as a stored procedure or view though. Doing so allows you to test your SQL on the database before you start working in your R environment.
If you follow these steps, then your R code should be something like:
conn <- odbcConnect(dsn="MyOdbcConnectionName", uid="myDatabaseUserName", pwd="myPassword")
query <- "YourQuery goes here"
# e.g. "select * from table"
# e.g. "EXEC myStoredProcedure"
data <- sqlQuery(conn, query)
close(conn)