![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Nizamuddin Siddiqui has Published 2307 Articles
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
If we have a string column in an R data frame and the strings are mixed with numbers and we want to find the number of characters in each row of the string column then nchar function can be used with gsub function as shown in the below examples.Since R ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
135 Views
To create histogram like plot with different color of bars, we can use col argument and provide the range up to the number of bars we expect in the histogram like plot.For example, if we have a vector of length 10 called X then we can create histogram like plot ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
568 Views
To randomly split a vector into n vectors of different lengths, we can use sample function and set the repl argument to TRUE.For example, if we have a vector called X of size 100 then we can split it randomly into 10 vectors of different lengths by using the below ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
308 Views
To scale some columns in data.table object in R, we can follow the below steps −First of all, create a data.table object.hen, subset the columns with single square brackets and use lapply, list and scale function to scale those columns.ExampleCreate the data.table objectLet’s create a data.table object as shown below ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
665 Views
To unsplit a split in R data frame, we can follow the below steps −First of all, create a data frame.Then, use split function to split the data frame.After that, use do.call function along with rbind function unsplit the data frame.ExampleCreate the data frameLet’s create a data frame as shown ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
638 Views
If we have a data frame where row indices are not in correct sequence then we can set them to NULL to get the correct sequence of row numbers starting from 1.For example, if we have a data frame called df which has row ordered in an inappropriate way then ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
To print the exact values of all elements in a column of an R data frame, we can follow the below stops −First of all, create a data frame.Then, use options function and provide the required number of digits for printing.ExampleCreate the data frameLet’s create a data frame as shown ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
5K+ Views
To change the color code of corrplot, we can use colorRampPalette function inside corrplot function. We can provide different colors in colorRampPalette that we want to display in the corrplot.Check out the below given example to understand how it can be done.ExampleFollowing snippet creates a sample data frame −xRead More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
291 Views
To convert values greater than a threshold into 1 in matrix in R data frame, we can follow the below steps −First of all, create a matrix.Then, use ifelse function to convert values greater than a threshold into 1.ExampleCreate the matrixLet’s create a matrix as shown below −M
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
5K+ Views
To check if two vectors are exactly same, we can use identical function.For example, if we have two vectors say x and y then we can find whether both of them are exactly same or not by using the command given below −identical(x, y)Check out the below examples to understand ... Read More