Explain toupper and tolower and substring function in R?
MACHINE LEARNING RECIPES DATA CLEANING PYTHON DATA MUNGING PANDAS CHEATSHEET     ALL TAGS

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

0

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

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.

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

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.

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

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.

Choosing the right Time Series Forecasting Methods
There are different time series forecasting methods to forecast stock price, demand etc. In this machine learning project, you will learn to determine which forecasting method to be used when and how to apply with time series forecasting example.

Learn to prepare data for your next machine learning project
Text data requires special preparation before you can start using it for any machine learning project.In this ML project, you will learn about applying Machine Learning models to create classifiers and learn how to make sense of textual data.

Data Science Project in Python on BigMart Sales Prediction
The goal of this data science project is to build a predictive model and find out the sales of each product at a given Big Mart store.

German Credit Dataset Analysis to Classify Loan Applications
In this data science project, you will work with German credit dataset using classification techniques like Decision Tree, Neural Networks etc to classify loan applications using R.

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.