VOOZH about

URL: https://www.geeksforgeeks.org/r-language/assigning-values-to-variables-in-r-programming-assign-function/

⇱ Assigning values to variables in R programming - assign() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Assigning values to variables in R programming - assign() Function

Last Updated : 12 Jul, 2025
In R programming, assign() method is used to assign the value to a variable in an environment.
Syntax : assign(variable, value) Return : Return the variable having value assigned.
Example 1: Output:
[1] 10
Example 2: Output:
[1] 20.12345
Comment
Article Tags:

Explore