Addition in R programming language

R programming language is very popular for data science, machine learning and statistical computing. Furthermore, the syntax of R is very simple and easy to learn. In this pots, I am going to make a simple program in R which will add two numbers.

a<-12

b<-13

c<-a+b

print(c)

In the above program, two numeric vectors a and b are created, thereafter sum of a and b is c which is 25. Using print output function you can see the value of c.

 

The arrow symbol  <- in R work as assignment operator.

Leave a Comment

Your email address will not be published. Required fields are marked *

©Postnetwork-All rights reserved.