Assigning values to variables in R programming – assign() Function Last Updated : 10 May, 2020 Improve Improve Like Article Like Save Share Report 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: # Using assign() method assign("gfg", 10) print(gfg) Output: [1] 10 Example 2: # Using assign() method assign("gfg", 20.12345) print(gfg) Output: [1] 20.12345 Like Article Suggest improvement Next Convert Degree value to Radian value in R Programming - deg2rad() Function Share your thoughts in the comments Add Your Comment Please Login to comment...