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

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

In this project, we are going to work on Deep Learning using H2O to predict Census income.

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

In this project, we are going to talk about Time Series Forecasting to predict the electricity requirement for a particular house using Prophet.

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 machine learning project, you will develop a machine learning model to accurately forecast inventory demand based on historical sales data.

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.

PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.

In this Kmeans clustering machine learning project, you will perform topic modelling in order to group customer reviews based on recurring patterns.

In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.