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?

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

Build a Collaborative Filtering Recommender System in Python
Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.

Demand prediction of driver availability using multistep time series analysis
In this supervised learning machine learning project, you will predict the availability of a driver in a specific area by using multi step time series analysis.

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.

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

Walmart Sales Forecasting Data Science Project
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.

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.

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

Resume parsing with Machine learning - NLP with Python OCR and Spacy
In this machine learning resume parser example we use the popular Spacy NLP python library for OCR and text classification.

Natural language processing Chatbot application using NLTK for text classification
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.

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.