Hi there,

I encountered a problem today while trying to plot two ggplots side by side.

I tried using the **par** command but it seemed to work only for base plotting package and not lattice and ggplot.

Here is what I tried.

```
library(data.table)
setwd("F:\\ML_P\\course 2")
data<-fread("crime rate.csv")
View(data)
par(mfrow=c(2,2))
library(ggplot2)
g1<-ggplot(data,aes(HousePrice,CrimeRate))+geom_point()+geom_smooth(method = "lm")
data1<-subset(data,CrimeRate<200)
g2<-ggplot(data1,aes(HousePrice,CrimeRate))+geom_point()+geom_smooth(method = "lm")+ylim(0,300)
```

Am I doing anything wrong ? Or is par incompatible with tht lattice and ggplot packages.

Thanks

Neeraj