![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
2K+ Views
To convert a list to JSON, we can use toJSON function of jsonlite package. For example, if we have a list called LIST then it can be converted to a JSON by using the command toJSON(LIST, pretty=TRUE, auto_unbox=TRUE). We need to make sure that the package jsonlite is loaded in ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
414 Views
To randomly sample rows from an R data frame using sample_n, we can directly pass the sample size inside sample_n function of dplyr package. For example, if we have data frame called df then to create a random sample of 5 rows in df can be done by using the ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
2K+ Views
To add a variable description in R, we can use comment function and if we want to have a look at the description then structure call of the data frame will be used. For example, if we have a data frame say df that contains a column x then we ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
2K+ Views
To format all decimal places in an R vector and data frame, we can use formattable function of formattable package where we can specify the number of digits after decimal places. For example, if we have a numerical vector say x then the values in x can be formatted to ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
857 Views
To create multiple bar plots for varying categories with same width bars using ggplot2, we would need to play with width argument inside geom_bar function to match the width of the bars in each bar plot. The best way to do this would be setting the larger ones to 0.25 ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
To find the high leverage values for a regression model, we first need to find the predicted values or hat values that can be found by using hatvalues function and then define the condition for high leverage and extract them. For example if we have a regression model say M ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
259 Views
To apply multiple conditions to a data frame, we can use double and sign that is &&. For example, if we have a data frame called df that contains three columns say x, y, z and we want to add a value to all columns if first element in z ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
287 Views
To create a bar plot in base R, we can use the function barplot and pass the vector or column of the data frame for which we want to create the bar plot but the bars created by using barplot by default has grey color. Therefore, if we want to ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
6K+ Views
To check if a time series is stationary, we can use Dickey-Fuller test using adf.test function of tseries package. For example, if we have a time series object say TimeData then to check whether this time series is stationary or not we can use the command adf.test(TimeData).Example1 Live Demox1Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
3K+ Views
To deal with Error: stat_count() can only have an x or y aesthetic, we need to pass the stat="identity" argument inside geom_bar function. Since we do not pass the count for bars and a bar graph can only contain only count variable, hence stat="identity" is needed so that geom_bar considers ... Read More