Nizamuddin Siddiqui has Published 2307 Articles

How to create a scatterplot with log10 of dependent variable in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:30:28

318 Views

Most of the times, the relationship between independent variable and dependent variable is not linear. Therefore, we want to transform the dependent variable or independent variable based on our experiences. Hence, we also want to plot those transformations to visualize the relationship, one such transformation is taking log10 of the ... Read More

What is the difference between NA and in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:25:13

372 Views

The missing values are represented by NA but if we read them as "NA" then it becomes a level of a factor variable. If we believe that a vector is numeric and we have an "NA" in that vector then it will not be a numeric vector. On the other ... Read More

How to find the 95% confidence interval for the slope of regression line in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:22:57

4K+ Views

The slope of the regression line is a very important part of regression analysis, by finding the slope we get an estimate of the value by which the dependent variable is expected to increase or decrease. But the confidence interval provides the range of the slope values that we expect ... Read More

How to select a column of a matrix by column name in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:21:42

2K+ Views

When we create a matrix in R, its column names are not defined but we can name them or might import a matrix that might have column names. If the column names are not defined then we simply use column numbers to extract the columns but if we have column ... Read More

How to draw a violin plot in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:19:46

256 Views

A violin plot is similar to a boxplot but looks like a violin and shows the distribution of the data for different categories. It shows the density of the data values at different points. In R, we can draw a violin plot with the help of ggplot2 package as it ... Read More

How to create dotted vertical lines in a plot using ggplot2 in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:17:29

660 Views

In any plot, the vertical lines are generally used to show the thresholds for something, for example, range of the variable under consideration. The package ggplot2 provides geom_vline function to create vertical lines on a plot and we have linetype argument of this function which can be used to draw ... Read More

What is the difference between order and rank function in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:14:28

866 Views

The rank function gives the rank of the values in a vector if the vector is sorted but in the same sequence as the original vector and the order function gives the position of the original value in the vector but in the sequence of the sorting in ascending order. ... Read More

How to find the functions inside a package in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:13:45

3K+ Views

There are so many packages in R and each of these packages have different objectives, thus, the number of functions in these packages are large enough to solve the problems in analysis. A package might have fifteen functions and the other might have hundred, it totally depends on the necessity. ... Read More

How to extract a string that lies between two strings in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:12:30

413 Views

If we have a long string then we might want to extract a part of string that lies between two strings. For example, if we have a string “E-learning changing the education system in the world” and we want to extract the string “the education system” brave then we must ... Read More

How to find the number of runs in a sequence in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Aug-2020 12:11:24

442 Views

Sometimes data is recorded as a sequence of numerical values or strings and we might to find the frequency for each of the sequences. This helps us to check the variation in the runs but we must make sure the total frequency is equal to the total number values, otherwise ... Read More

Advertisements