Explain toupper and tolower and substring function in R?

Explain toupper and tolower and substring function in R?

Explain toupper and tolower and substring function in R?

This recipe explains what toupper and tolower and substring function in R

Recipe Objective

Explain toupper, tolower, substring function in R? - tolower (): converts all the characters of a string into lower case - toupper (): converts all the characters of a string into upper case - substring () : helps extract some specified substring of a character string as well as to replace substring characters in the string. This recipe demonstrates an explanation of different functions in R.

Step 1- Use tolower()

a <- "Hello World" print(tolower(a))
"Output of the code is":"hello world"

Step 2- Use toupper()

b <- "hello world" print(toupper(b))
"Output of the code is":"HELLO WORLD"

Step 3 - Use substring()

c <- "Hello world" # extracts a substring from the main string print(substring(c,2,7))
"Output of the code is":"ello w"
c <- "helloyworld" # replaces y with " " in the string substring(a,6,6)=' ' print(c)
"Output of the code is":'hello world'

Relevant Projects

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

NLP and Deep Learning For Fake News Classification in Python
In this project you will use Python to implement various machine learning methods( RNN, LSTM, GRU) for fake news classification.

House Price Prediction Project using Machine Learning
Use the Zillow dataset to follow a test-driven approach and build a regression machine learning model to predict the price of the house based on other variables.

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.

Build a Face Recognition System in Python using FaceNet
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.

Build OCR from Scratch Python using YOLO and Tesseract
In this deep learning project, you will learn how to build your custom OCR (optical character recognition) from scratch by using Google Tesseract and YOLO to read the text from any images.

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.

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.

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

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