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

# How to divide 2 numbers in R?

This recipe helps you divide 2 numbers in R

How to divide two numbers in R ? The division of two numbers is an arithmetic operation of dividing two numbers and storing the output in a vector. The input values can be pre-defined or can be user-defined. The division operation can be done on a single number or a list of input values. This recipe performs the division of two numbers using the / operator..

```
x <- 100
y <- 20
```

Divide the two input vectors and store the ouput in a third output vector

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

"Output of the code is" : 5

Division 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 : 100 enter the second input value : 20

The user defined input values are character type , they are converted into integer type for performing the division 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 5

In this machine learning project you will work on creating a robust prediction model of Rossmann's daily sales using store, promotion, and competitor data.

In this machine learning project, you will develop a machine learning model to accurately forecast inventory demand based on historical sales data.

In this time series project, you will forecast Walmart sales over time using the powerful, fast, and flexible time series forecasting library Greykite that helps automate time series problems.

In this data science project, you will contextualize customer data and predict the likelihood a customer will stay at 100 different hotel groups.

Machine Learning Project in R-Detect fraudulent click traffic for mobile app ads using R data science programming language.

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

In this NLP Project, you will learn how to use the popular topic modelling library Gensim for implementing two state-of-the-art word embedding methods Word2Vec and FastText models.

In this NLP AI application, we build the core conversational engine for a chatbot. We use the popular NLTK text classification library to achieve this.

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 loan prediction project you will build predictive models in Python using H2O.ai to predict if an applicant is able to repay the loan or not.