
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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
4K+ Views
To change the color of gridlines of a ggplot2 graph in R, we can use theme function with panel.grid.major and panel.grid.minor arguments where we can set the minor and major gridlines color of the plot panel to desired color.To understand how it can be done, check out the below Example.ExampleFollowing ... Read More

Nizamuddin Siddiqui
5K+ Views
To change the plot border color of a ggplot2 graph in R, we can use theme function with panel.background argument where we can set the border of the plot panel using element_rect to desired color.To understand how it can be done, check out the below Example.ExampleFollowing snippet creates a sample ... Read More

Nizamuddin Siddiqui
547 Views
To find the sum of a column values based on another numerical column in R, we can use with function and define the sum by subsetting the column with the help of single square brackets.For Example, if we have a data frame called df that contains two columns say X ... Read More

Nizamuddin Siddiqui
730 Views
To create horizontal line in xyplot, we can use abline function.For Example, if we have a data frame called df that contains two columns say X and Y and we want to create a scatterplot between X and Y using xyplot with a horizontal line at Y = 2 then ... Read More

Nizamuddin Siddiqui
443 Views
If we have a data.table object and we want to find the column name for row maximum then we can use max.col function.For Example, if we have a data.table object called DT then we can find the column name for row maximum by using the below command −DT[, names(.SD)[max.col(.SD, ties.method="first")]]Example ... Read More

Nizamuddin Siddiqui
6K+ Views
To remove rows from a data frame that exists in another data frame, we can use subsetting with single square brackets. This removal will help us to find the unique rows in the data frame based on the column of another data frame.Check out the below Examples to understand how ... Read More

Nizamuddin Siddiqui
580 Views
To add values in sequence to the previous value with a constant, we can find the cumulative sum of values and add the constant to the Output.For Example, if we have a vector called X and we want to add values in X in sequence to the previous value with ... Read More

Nizamuddin Siddiqui
2K+ Views
To create cross tabulation for three categorical columns, we can use xtabs function. The xtabs function will create contingency table for each category in two columns and each contingency table will be created for the category in the third column.Check out the below Examples to understand how it can be ... Read More

Nizamuddin Siddiqui
460 Views
To change the name of column variable and row variable in xtab table, we can use setNames function.For Example, if we have a xtab table called XTAB and we want to change the column variable name C and row variable name R then we can use the below command −dimnames(XTAB)Read More

Nizamuddin Siddiqui
1K+ Views
To create confusion matrix for a rpart model, we first need to find the predicted values then the table of predicted values and the response variable in the original data can be created, which will be the confusion matrix for the model.For Example, if we have a vector of predicted ... Read More