Plotting multiple graphs on the same page in R

0 votes
I would want to plot four histograms side by side for the first four columns of the "Iris" data-set. Is there a method in R do that?
Mar 27, 2018 in Data Analytics by kurt_cobain
• 9,260 points
40 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

If you want to plot 4 graphs onto the same pane, you can use the below command:

par(mfrow=c(2,2))

Now, you can plot the four histograms:

hist(iris$Sepal.Length)
hist(iris$Petal.Length)
hist(iris$Sepal.Width)
hist(iris$Petal.Width)
answered Mar 27, 2018 by Bharani
• 4,550 points

Related Questions In Data Analytics

0 votes
1 answer

How to find out the sum/mean for multiple variables per group in R?

You can use the reshape2 package for ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,100 points
213 views
0 votes
1 answer

How can I print string and variable contents on the same line using R?

There are two options for doing so.  You ...READ MORE

answered May 9, 2018 in Data Analytics by zombie
• 3,690 points
15 views
0 votes
1 answer

Multiple plots onto a single page in R

Plotting multiple plots onto a single page ...READ MORE

answered Jul 17, 2018 in Data Analytics by darklord
• 6,140 points
27 views
0 votes
1 answer

Loop to automate the plotting process in R

Try something like this: library(tidyverse) data(iris) ## create a grid ...READ MORE

answered Dec 6, 2018 in Data Analytics by Maverick
• 10,020 points
22 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
32 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
59 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
75 views
+1 vote
1 answer

Custom Function to replace missing values in a vector with the mean of values

You have missed out on "na.rm=TRUE" inside ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,550 points
38 views
0 votes
1 answer

Applying the same function to every row of a data.frame - R

You can use the 'appply()' function for ...READ MORE

answered May 22, 2018 in Data Analytics by Bharani
• 4,550 points
29 views
0 votes
1 answer

Changing the order of bars in a bar-plot - ggplot2 - R

You can use the scale_x_discrete() function with ...READ MORE

answered May 28, 2018 in Data Analytics by Bharani
• 4,550 points
1,579 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.