Nizamuddin Siddiqui has Published 2303 Articles

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

361 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

1K+ 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

8K+ 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

469 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

4K+ 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

551 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

How to create a plot for the response variable grouped by two columns using ggplot2 in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

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

149 Views

When two categorical variables make an impact on the response variable together then it is necessary to visualize their effect graphically because this graph helps us to understand the variation in the effect. Therefore, we can create a plot for the response variable that changes with one or both of ... Read More

How to create a subset of rows or columns of a matrix in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 13:26:10

2K+ Views

A matrix can have multiple rows and columns like a data frame. As in data frames, we sometimes require to take subsets, the same might be required with matrices. But subsetting matrices data is quite simple as compared to subsetting a data frame.ExampleConsider the below matrix −> M M [, ... Read More

How to join two data frames based one factor column with different levels and the name of the columns in R using dplyr?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2020 13:20:59

593 Views

When there is a common factor with different levels, the joining of data frames is possible but the result will present all the levels with dplyr. We can make use of left_join function to join the two data frames but the size of the first data frame must be greater ... Read More

Advertisements