MACHINE LEARNING RECIPES
DATA CLEANING PYTHON
DATA MUNGING
PANDAS CHEATSHEET
ALL TAGS
# How to add 2 numbers in R?

# How to add 2 numbers in R?

This recipe helps you add 2 numbers in R

How to add two numbers in R? The addition of two numbers is an arithmetic operation of adding the two numbers and storing the output in a vector. The input values can be pre-defined or can be user-defined. The addition operation can be done on a single number or a list of input values. sum () is the function used for performing the operation. This recipe performs the addition of two numbers using the + as well as the sum () function..

```
x <- 10
y <- 20
```

Add the two input vectors and store the output value in a third vector

```
z <- x+y
print(paste("Addition of two numbers is:",z))
```

"Output of the code is : Addition of two numbers is" : 30

Addition of two numbers can also be done , with user defined values using the following syntax

```
a <- readline(prompt="enter the first input value : ")
b <- readline(prompt="enter the second input value : ")
```

"Output of the line is": enter the first input value : 10 enter the second input value : 20

The user defined input values are character type , they are converted into integer type for performing the addition operation

```
a <- as.integer(a)
b <- as.integer(b)
```

Adding two user defined input vectors and storing the output in a third vector

```
c <- a + b
print(paste("Addition of user defined two numbers is:",c))
```

"Output of the code is : Addition of two numbers is" : 30

```
x <- c(10,20)
print(paste("Addition of two numbers is :",sum(x)))
```

"Output of the code is : Addition of two numbers is" : 30

In this data science project, you will work with German credit dataset using classification techniques like Decision Tree, Neural Networks etc to classify loan applications using R.

In this machine learning and IoT project, we are going to test out the experimental data using various predictive models and train the models and break the energy usage.

Deep Learning Project- Learn to apply deep learning paradigm to forecast univariate time series data.

In this ensemble machine learning project, we will predict what kind of claims an insurance company will get. This is implemented in python using ensemble machine learning algorithms.

In this data science project in R, we are going to talk about subjective segmentation which is a clustering technique to find out product bundles in sales data.

In this machine learning resume parser example we use the popular Spacy NLP python library for OCR and text classification.

Data Science Project in Python- Build a machine learning algorithm that automatically suggests the right product prices.

In this project, we are going to talk about H2O and functionality in terms of building Machine Learning models.

In this project, we are going to work on Sequence to Sequence Prediction using IMDB Movie Review Datasetâ€‹ using Keras in Python.

In this supervised learning machine learning project, you will predict the availability of a driver in a specific area by using multi step time series analysis.