Nizamuddin Siddiqui

Nizamuddin Siddiqui

1,958 Articles Published

Articles by Nizamuddin Siddiqui

Page 57 of 196

How to set the number of digits to be printed for summary command without using options(digits) in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 264 Views

To set the nuber of digits to be printed for summary command without using options(digits), we can use digits argument while printing the summary. −Example 1Using mtcars data and finding the summary statistics with number of digits set to 2 − Live Demosummary(mtcars, digits=2)On executing, the above script generates the below output(this output will vary on your system due to randomization) −Output   mpg             cyl            disp            hp          drat Min.   :10    Min.   :4.0    Min.   : 71    Min. ...

Read More

How to find the number of rows in a data.table where two or more column values meet a criteria in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 503 Views

To find the number of rows in a data.table where two or more column values meet a criteria, we can follow the below steps −First of all, create a data.table object.Find the number of rows meeting a criteria.Create data.table objectLet’s create a data.table object as shown below −x

Read More

How to subset a named vector based on names in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 889 Views

To subset a named vector based on names, we can follow the below steps −Create a named vector.Subset the vector using grepl.Create the named vectorLet’s create a name vector as shown below − Live DemoV

Read More

How to display two equal signs in R using ggplot2?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 327 Views

To display two equal signs using ggplot2, we can follow the below steps −First of all, create a data frame.Create a scatterplot(you can create any other plot).Display two equal signs using annotate functionCreate the data frameLet's create a data frame as shown below − Live Demox

Read More

How to display regression slope using model in a plot created by ggplot2 in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 8K+ Views

To display regression slope using model in a plot created by ggplot2, we can follow the below steps −First of all, create the data frame.Use annotate function of ggplot2 to create the scatterplot with regression slope displayed on the plot.Check the regression slope.Create the data frameLet's create a data frame as shown below − Live Demox

Read More

How to create a scatterplot with dark points using ggplot2 in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 335 Views

To create a scatterplot with low intensity of points using ggplot2, we can follow the below steps −First of all, create a data frame.Then, create the scatterplot.Create the scatterplot with scale_color_hue function for dark points.Create the data frameLet's create a data frame as shown below − Live Demox

Read More

How to create a scatterplot with low intensity of points using ggplot2 in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 395 Views

To create a scatterplot with low intensity of points using ggplot2, we can follow the below steps −First of all, create a data frame.Then, create the scatterplot.Create the scatterplot with scale_color_hue function for low intensity of points.Create the data frameLet's create a data frame as shown below − Live Demox

Read More

How to divide the row values by row mean in data.table object in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 176 Views

To divide the row values by row mean in R’s data.table object, we can follow the below steps −First of all, create a data.table object.Then, use apply function to divide the data.table object row values by row mean.Create the data framelibrary(data.table) x

Read More

How to create boxplot for categories with grey color palette using ggplot2 in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 1K+ Views

To create boxplot for categories with grey color palette using ggplot2, we can follow the below steps −First of all, create a data frame.Then, create the boxplot for categories with default color of bars.Create the boxplot for categories with color of bars in grey palette.Create the data frameLet's create a data frame as shown below − Live DemoGroup

Read More

How to create scatterplot for categories with grey color palette using ggplot2 in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 13-Aug-2021 265 Views

To create scatterplot for categories with grey color palette using ggplot2, we can follow the below steps −First of all, create a data frame.Then, create the scatterplot for categories with default color of points.Create the scatterplot for categories with color of points in grey palette.Create the data frameLet's create a data frame as shown below − Live Demox

Read More
Showing 561–570 of 1,958 articles
« Prev 1 55 56 57 58 59 196 Next »
Advertisements