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 363 views

## 1 answer to this question.

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
• 4,620 points

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

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

0 votes
1 answer

## Multiple plots onto a single page in R

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

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

0 votes
2 answers

## Transforming a key/value string into distinct rows in R

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

0 votes
1 answer

## Finding frequency of observations in R

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

0 votes
1 answer

## Left Join and Right Join using "dplyr"

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

+1 vote
2 answers

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

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE ...READ MORE

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

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