MACHINE LEARNING RECIPES
DATA CLEANING PYTHON
DATA MUNGING
PANDAS CHEATSHEET
ALL TAGS
# 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

Implement a machine learning approach using various classification techniques in Python to examine the digitalisation process of bank customers.

Data Science Project in R-Predict the sales for each department using historical markdown data from the Walmart dataset containing data of 45 Walmart stores.

Use the Mercari Dataset with dynamic pricing to build a price recommendation algorithm using machine learning in Python to automatically suggest the right product prices.

Data Science Project - Build a recommendation engine which will predict the products to be purchased by an Instacart consumer again.

In this Deep Learning Project on Image Segmentation Python, you will learn how to implement the Mask R-CNN model for early fire detection.

In this human activity recognition project, we use multiclass classification machine learning techniques to analyse fitness dataset from a smartphone tracker.

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

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 project you will use Python to implement various machine learning methods( RNN, LSTM, GRU) for fake news classification.

In this OpenCV project, you will learn computer vision basics and the fundamentals of OpenCV library using Python.