There are many ways to connect to a database in R, the one I prefer is to use the RJDBC package, because it’s fairly straight forward and simple to use RJDBC. You need to get your driver, and then define the DSN. Then you create a connection object and are good to go.
Now you can use all sorts of functions to send requests to the database.
When you’re done, you can and should disconnect with dbDisconnect
function.
Connecting to Teradata Database
This process is almost identical. First, you need to change the driver. Then the connectionString format is slightly different.
Now you’re ready to send requests to a Teradata machine.