![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
597 Views
To add a caption in a ggplot2 graph in R, we can use labs function. For Example, if we have a data frame called df that contains two columns say X and Y and we want to create scatterplot between X and Y with a caption as a Note that ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
If we create histogram for multiple categories using ggplot2 then the legend is generated automatically based on the categories. And if we want to change that legend or create a histogram with different legend values having different colors for histograms then scale_fill_manual function can be used as shown in the ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
3K+ Views
To find the location of installed packages in R in windows operating system, we can use the command mentioned below −.libPaths()This will return the location of installed packages in the first line and the program files in the second line.Use the below mentioned code to find the location of installed ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
339 Views
To make all values in an R data frame unique, we can use make.unique function but firstly we would need to unlist the data frame values and read them with as.character. For Example, if we have a data frame called df that contains duplicate as well as nonduplicate values then ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
3K+ Views
To find the row corresponding to a nearest value in an R data frame, we can use which.min function after getting the absolute difference between the value and the column along with single square brackets for subsetting the row.To understand how it works, check out the examples given below.Example 1Following ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
333 Views
The easiest way to find the frequency is to create a table for the provided vector or data frame column and it can be done with table function. But, if the frequency needs to be found with subsetting then subset function and transform function will also be required as shown ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
946 Views
When we have NAs present in the data frame or matrix then correlation matrix contains NA values. Now if we create the correlation matrix plot using corrplot function the Output display question marks.If we want to create the correlation matrix without question marks then we can use the na.label argument ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
2K+ Views
To create a block diagonal matrix using a matrix in R, we can use bdiag function of Matrix package.For Example, if we have a matrix called M and we want to create block diagonal using M 4 times by using the below command −bdiag(replicate(4, M, simplify=FALSE))Check out the Examples given ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
2K+ Views
The sub totals for every row and column are actually called marginal sums. Therefore, we can use addmargins function to our table to get the sub totals for every row and column.For example, if we have table called TABLE then we can add the sub totals by using the command ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
5K+ Views
To create table of two factor columns in an R data frame, we can use table function and with function.For Example, if we have a data frame called df that contains two factor columns say F1 and F2 then we can create table of these two columns by using the ... Read More