Teradata provides in-database support for R program execution. Data stored in Teradata databases can be directly accessed by the R execution engine for analysis. R scripts are executed in parallel inside the database using the system table operator ExecR. R scripts can only be run as table operators and not as user-defined functions.
For more details refer to the topic R Table Operator in the Table Operators chapter of SQL Functions, Operators, Expressions, and Predicates.