
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
890 Views
To replace zero with previous value in an R data frame column, we can use na.locf function of zoo package but to apply this we first need to replace the zero values with NA.For example, if we have a data frame called df that contains a column say Rate then ... Read More

Nizamuddin Siddiqui
2K+ Views
To create scatterplot for two dependent variables and one independent variable, we can use geom_point function and geom_smooth function of ggplot2 package. Both of these functions will be used twice, where we can define the aesthetics of the plot for each dependent variable as shown in the Example below.ExampleFollowing snippet ... Read More

Nizamuddin Siddiqui
139 Views
To draw concentric circles, we can use draw.circle function of plotrix package where we can put lwd argument but firstly we would need to create a blank graph with plot function as shown below.For Example, we can create three concentric circles at position X=5 and Y=5 having radius of 1, ... Read More

Nizamuddin Siddiqui
357 Views
To create matrix diagram, we can use corrplot function of corrplot function. For this purpose, we would need to set is.corr argument to FALSE so that the matrix values will be plotted in the diagram. Otherwise, the corrplot function requires correlation matrix instead of a matrix.Check out the Example given ... Read More

Nizamuddin Siddiqui
988 Views
To create line chart for mean covered with minimum and maximum in R, we first need to create columns for row means, row minimum, and row maximum after that geom_line function can be used along with geom_ribbon function of ggplot2 package as shown in the below example.ExampleFollowing snippet creates a ... Read More

Nizamuddin Siddiqui
1K+ Views
If we want to add two columns of an R data frame and each of them contains missing values then the addition of columns can be done in one of the following ways −Adding both the column values if they are numeric.Returning numeric if one of the columns has missing ... Read More

Nizamuddin Siddiqui
297 Views
We can take the transpose of vectors stored in an R list by using Map function with do.call. For example, if we have a list called LIST that contains say ten vectors then we can transpose these vectors by using the command given below − do.call(Map, c(f=c, LIST))Check out the ... Read More

Nizamuddin Siddiqui
3K+ Views
To subset a matrix based on values in a particular column, we can use single square brackets and provide the row and column values. The column values will be set for the columns that we want to subset and the row value will be set for the values of the ... Read More

Nizamuddin Siddiqui
671 Views
To highlight outliers in a boxplot, we can create the boxplot with the help of Boxplot function of car package by defining the id.method.For example, if we have a vector called V then the boxplot of V with highlighted outliers can be created by using the below given command −Boxplot(~V, ... Read More

Nizamuddin Siddiqui
834 Views
To create an exponential distribution plot, we can use curve function.For example, if we want to create a exponential distribution plot for 100 values with rate parameter equal to ½ then we can use the command given below:curve(dexp(x, rate=1/2), xlim=c(1, 50))Check out the below examples to understand how it works.Example ... Read More