Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
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?
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 MoreHow to find the number of rows in a data.table where two or more column values meet a criteria in R?
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 MoreHow to subset a named vector based on names in R?
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 MoreHow to display two equal signs in R using ggplot2?
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 MoreHow to display regression slope using model in a plot created by ggplot2 in R?
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 MoreHow to create a scatterplot with dark points using ggplot2 in R?
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 MoreHow to create a scatterplot with low intensity of points using ggplot2 in R?
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 MoreHow to divide the row values by row mean in data.table object in R?
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 MoreHow to create boxplot for categories with grey color palette using ggplot2 in R?
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 MoreHow to create scatterplot for categories with grey color palette using ggplot2 in R?
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