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 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.

Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

Use the Zillow dataset to follow a test-driven approach and build a regression machine learning model to predict the price of the house based on other variables.

Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

In this deep learning project, you will build your own face recognition system in Python using OpenCV and FaceNet by extracting features from an image of a person's face.

In this data science project, you will learn how to perform market basket analysis with the application of Apriori and FP growth algorithms based on the concept of association rule learning.

In this deep learning project, you will learn how to build your custom OCR (optical character recognition) from scratch by using Google Tesseract and YOLO to read the text from any images.

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

This data science in python project predicts if a loan should be given to an applicant or not. We predict if the customer is eligible for loan based on several factors like credit score and past history.

In this machine learning churn project, we implement a churn prediction model in python using ensemble techniques.