Friday, 12 June 2015

R : Assignment Operator : <-

Operator ‘<-‘ is used to assign a value to variable.

> i <- 10
> i
[1] 10
> print(i)
[1] 10

Expression ‘i <- 10” assign value 10 to the variable i. You can print value of I by simply typing it on R console (or) by passing it as an argument to print method.


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment