->To assign a value (or) a formula to a variable, the assignment operator [= or <- ] is used!
Example:1
x<-7 #assign the value of 7 to x
x
## [1] 7
y=6 #assign the value of 6 to y
y
## [1] 6
8->z #assign the value of 8 to z
z
## [1] 8
Example:2
If we are perform an assignment over multiple lines using continuation prompt or single line
x<-6 + #the expression incomplete Rs point of view
102*34 -
340 /
23 #no operator so here evaluate the expression
x
## [1] 3459.217
->All function names, variable names, keywords etc in R are case-sensitive!
->Example: a 3 and A 4 will retain their case-specific values Example:3
adusu<-10 #lower Case
adusu
## [1] 10
ADUSU<-100 #Upper Case
ADUSU
## [1] 100
Example:4 #R ignores blank spaces!
adusu <-2011
adusu
## [1] 2011
Comments :
->Comments may be added to a functionor ssignment using the # key!
->Anything from the # to the end of the line is ignored
Example 1: pound or #
Example 2: pound
Example 3: Multi line or two line ssignment
enjoyed :)