Nizamuddin Siddiqui has Published 2307 Articles

How to create a graph in base R with multiple shades of a particular color?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 10-Aug-2021 08:55:28

46 Views

To create a graph in base R with multiple shades of a particular color, we can follow the below steps −First of all, create color shades using colorRampPalette then plot a graph.Use the color shades to create the graph.Example 1Create the color shadesUsing colorRampPalette function to create the color shades ... Read More

How to subset rows of an R data frame if all columns have values greater than a certain value

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 09-Aug-2021 09:01:57

2K+ Views

To subset rows of an R data frame if all columns have values greater than a certain value, we can follow the below steps −First of all, create a data frame.Then, use filter_all function of dplyr package with all_vars function to subset the rows of the data frame for all ... Read More

How to create horizontal line for Y variable at median in base R plot?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 09-Aug-2021 07:44:48

281 Views

To create horizontal line for Y variable at median in base R plot, we can follow the below steps −First of all, create two vectors and plot them.Create the horizontal line at median using abline function.Create the vectors and plot themLet’s create two random vectors and plot them as shown ... Read More

How to create vertical line for X variable at median in base R plot

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 09-Aug-2021 07:43:09

332 Views

To create vertical line for X variable at median in base R plot, we can follow the below steps −First of all, create two vectors and plot them.Create the vertical line at median using abline function.Create the vectors and plot themLet’s create two random vectors and plot them as shown ... Read More

How to randomize column values of a data.table object for a set of columns in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Aug-2021 09:12:16

117 Views

To randomize column values of a data.table object for a set of columns in R, we can follow the below steps −First of all, create a data.table object.Then, use sample function for randomizationwith lapply while selecting the columns with SDcols.Create the data frameLet's create a data frame as shown below ... Read More

How to find the sum of numerical columns based on the combination of values incategorical columns in R data frame?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 03-Aug-2021 09:19:39

111 Views

To find the sum of numerical columns based on the combination of values in categorical columns in R data frame, we can follow the below steps −First of all, create a data frame.Then, find the sum of numerical columns based on the combination of values in categorical columns by using ... Read More

How to read a CSV file and store the values into an array in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 25-Mar-2021 04:45:41

24K+ Views

A CSV file is a comma-separated file, that is used to store data in an organized way. It usually stores data in tabular form. Most of the business organizations store their data in CSV files.In C#, StreamReader class is used to deal with the files. It opens, reads and helps ... Read More

How to test for significant relationship between two categorical columns of an R data frame?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 17-Mar-2021 07:48:29

531 Views

To test for the significance of proportion between two categorical columns of an R data frame, we first need to find the contingency table using those columns and then apply the chi square test for independence using chisq.test. For example, if we have a data frame called df that contains ... Read More

How to replace a particular value in R data frame with a new value?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 17-Mar-2021 07:43:11

928 Views

To replace a particular value in R data frame with a new value, we can use ifelse function where the new value will be placed after the condition and if the column values do not match the condition then the same column will be placed. For example, if we have ... Read More

How to create boxplot in base R with higher width of the box lines?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 17-Mar-2021 07:38:19

192 Views

To create boxplot in base R with higher width of the box lines, we can use the boxlwd argument inside boxplot function. For example, if we have a vector called x then we can create the boxplot with higher width of the box lines using the command −boxplot(x, boxlwd=5)Example Live DemoxRead More

Advertisements