In R programming,
Python3
Output:
Python3
Output:
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)
[1] 10Example 2:
# Using assign() method
assign("gfg", 20.12345)
print(gfg)
[1] 20.12345