![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Nizamuddin Siddiqui has Published 2307 Articles
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
5K+ Views
To add a column to data.table object, we can follow the below steps −First of all, create a data.table object.Add a column to the object using := functionCreate the data.table objectLet’s create a data.table object as shown below −library(data.table) x
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
4K+ Views
To check if a column is categorical in R data frame, we can follow the below steps −First of all, create a data frame.Use class function to check the class of the column.Create the data frameLet's create a data frame as shown below − Live Demox
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
83 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 ... 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](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
251 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 −xRead More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
260 Views
To find the number of unique values of multiple categorical columns based on one categorical column, we can follow the below steps −First of all, create a data frameUse summarise_each function with n_distinct function to find the number of unique values based on a categorical column.Create the data frameLet's create ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
575 Views
To check which element of a list which is a logical list is TRUE, we can follow the below steps −First of all, create a list with logical values.Use which function with unlist function to find the position of TRUE elements.Create the listLet’s create a list as shown below −ListRead More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
202 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
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
To display regression intercept 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 intercept displayed on the plot.Check the regression intercept.Create the data frameLet's create a data frame ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
6K+ 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 ... Read More