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

# How to multiply 2 numbers in R?

This recipe helps you multiply 2 numbers in R

0

## Recipe Objective

This recipe demonstrates how to carry out one of the basic arithmetic operation i.e. Multiplication. We will perform Multiplication on two numbers and store them in the 'result' variable.

## Step 1: Creating two numeric variables

We assign numbers to two variables

``` a <- 10 b <- 5 ```

## Step 2: Multiplying the two variables

We use the arithmetic operator " * " to carry out this task and finally store the result in a third variable

``` # storing the result of the multiplication of the two numbers stored in variables 'a' and 'b' in 'result' result <- a * b # displaying the value stored in result result ```
```50
```

Alternatively, we can also multiply two numbers without assigning any variables to it. Just like a calculator. This is done simply by writing the operation as mentioned below and pressing 'enter'

``` 10*5 ```
```50
```

#### Relevant Projects

##### Predict Credit Default | Give Me Some Credit Kaggle
In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

##### Loan Eligibility Prediction in Python using H2O.ai
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.

##### Build a Music Recommendation Algorithm using KKBox's Dataset
Music Recommendation Project using Machine Learning - Use the KKBox dataset to predict the chances of a user listening to a song again after their very first noticeable listening event.

##### Census Income Data Set Project - Predict Adult Census Income
Use the Adult Income dataset to predict whether income exceeds 50K yr based on census data.

##### Build a Similar Images Finder with Python, Keras, and Tensorflow
Build your own image similarity application using Python to search and find images of products that are similar to any given product. You will implement the K-Nearest Neighbor algorithm to find products with maximum similarity.

##### Ecommerce product reviews - Pairwise ranking and sentiment analysis
This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

##### Predict Macro Economic Trends using Kaggle Financial Dataset
In this machine learning project, you will uncover the predictive value in an uncertain world by using various artificial intelligence, machine learning, advanced regression and feature transformation techniques.

##### Loan Eligibility Prediction using Gradient Boosting Classifier
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.

##### PySpark Tutorial - Learn to use Apache Spark with Python
PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.

##### Credit Card Fraud Detection as a Classification Problem
In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.