Nizamuddin Siddiqui has Published 2307 Articles

How to create bar chart using ggplot2 with chart sub-title in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 14:21:44

131 Views

There are different ways to express any chart. The more information we can provide in a chart, the better it is because a picture says thousand words. Since nobody likes to read a long-reports, we should have better reporting of charts. Therefore, we can add a chart title as well ... Read More

How to create a data frame in R with repeated rows by a sequence of number of times or by a fixed number of times?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 14:18:16

850 Views

There are times when duplicated rows in a data frame are required, mainly they are used to extend the data size instead of collecting the raw data. This saves our time but surely it will have some biasedness, which is not recommended. Even though it is not recommended but sometimes ... Read More

How to create a data frame of the maximum value for each group in an R data frame using dplyr?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 14:06:37

379 Views

Sometimes subsetting of group wise maximum values is required while doing the data analysis and this subset of the data frame is used for comparative analysis. The main objective is to compare these maximums with each other or with a threshold value. In R, we can find the group wise ... Read More

How to join points on a scatterplot with smooth lines in R using plot function?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 14:04:45

247 Views

It is very difficult to join points on a scatterplot with smooth lines if the scatteredness is high but we might want to look at the smoothness that cannot be understood by just looking at the points. It is also helpful to understand whether the model is linear or not. ... Read More

How to find the standard error of mean in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 14:03:41

957 Views

The standard error of mean is the standard deviation divided by the square root of the sample size. The easiest way to find the standard error of mean is using the formula to find its value.Example> set.seed(1)We will find the standard errors for a normal random variable, sequence of numbers ... Read More

How to find the inverse of a matrix in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 14:02:10

6K+ Views

The inverse of a matrix can be calculated in R with the help of solve function, most of the times people who don’t use R frequently mistakenly use inv function for this purpose but there is no function called inv in base R to find the inverse of a matrix.ExampleConsider ... Read More

How to include a factor level in bar blot using ggplot2 in R if that level has a frequency zero.

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 13:57:01

314 Views

In research, sometimes we get a count of zero for a particular level of a factor variable but we might want to plot that in the bar plot so that anyone who look at the plot can easily understand what is missing and compare all the factor levels. In ggplot2, ... Read More

How to save matrix created in R as tables in a text file with column names same as the matrix?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 13:55:43

3K+ Views

Matrix data is sometimes need to be saved as table in text files, the reason behind this is storage capacity of text files. But when we save a matrix as text files in R, the column names are misplaced therefore we need to take care of those names and it ... Read More

How to display a list of plots with the help of grid.arrange in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 13:49:28

2K+ Views

In data analysis, we deal with many variables at a time and we want to visualize the histogram of these variables at a time. This helps us to understand the distribution of each variable in the data set, therefore we can apply the appropriate technique to deal with those variables. ... Read More

How to arrange a list of scatterplots in R using grid.arrange?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 13:46:12

437 Views

In predictive modeling, we get so many variables in our data set and we want to visualize the relationship among these variables at a time. This helps us to understand how one variable changes with the other, and on the basis of that we can use the better modeling technique. ... Read More

Advertisements