![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
3K+ Views
To create facets in vertical order using ggplot2 in R, we can follow the below steps −First of all, create a data frame.Then, create facetted plot with facet_grid function.After that, create the facetted plot with facet_wrap function.Create the data frameLet's create a data frame as shown below − Live DemoxRead More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
139 Views
To randomize column values of a data.table object for all columns in R, we can follow the below steps −First of all, create a data.table object.Then, use sample function with lapply to randomize the columns of the data.table object.Create the data frameLet's create a data frame as shown below −library(data.table) ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
434 Views
To create two lines using ggplot2 based on a categorical column in R, we can follow the below steps −First of all, create a data frame.Then, create the line chart with categorical column read as factor inside aes of ggplot function.Create the data frameLet's create a data frame as shown ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
430 Views
To create a clone of a data frame in R without data values, we can follow the below steps −First of all, create a data frame.Then, create the clone of the data frame by subsetting zero rows.Example 1Create the data frameLet's create a data frame as shown below − Live Demox1Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
3K+ Views
To filter data frame by categorical variable in R, we can follow the below steps −Use inbuilt data sets or create a new data set and look at top few rows in the data set.Then, look at the bottom few rows in the data set.Check the data structure.Filter the data ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
818 Views
To find the summary by categorical variable, we can follow the below steps −Use inbuilt data sets or create a new data set.Find the summary statistics with by function.Use inbuilt data setLet’s consider mtcars data set in base R − Live Demodata(mtcars) head(mtcars, 25)On executing, the above script generates the below ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
1K+ Views
To add values in columns having same name and merge them in R, we can follow the below steps −First of all, create a data frame.Add column values that have same name and merge them by using cbind with do.call.Create the data frameLet's create a data frame as shown below ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
184 Views
To change the color of line of a plot created for an xts object in R, we can follow the below steps −First of all, create a data frame.Then, convert this data frame into an xts object.Create the plot for the data in xts object with default color.Then, create the ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
150 Views
To create facetted plot with one facet displaying all data using ggplot2 in R, we can follow the below steps −First of all, create a data frame.Then, create facetted plot using facet_grid function.After that, create the facetted plot with margins argument set to TRUE to display the plot with all ... Read More
![Nizamuddin Siddiqui](https://www.tutorialspoint.com/assets/profiles/218290/profile/60_42434-1594357075.jpg)
Nizamuddin Siddiqui
384 Views
To create facetted plot with facets in horizontal direction using ggplot2 in R, we can follow the below steps −First of all, create a data frame.Then, create the facetted plot using facet_grid function of ggplot2 package.Use facet_grid function with reversed value of categorical column to create the facetted plot with ... Read More