I have been using this code to plot all the variables in my synthetic dataset, but I would like to modify it in order to compare the dataset to the main, original dataset.
synthetic %>%
keep(is.numeric) %>%
gather() %>%
ggplot(aes(value)) +
facet_wrap(~ key, scales = "free") +
geom_histogram()
I can't figure out how to make the plots go on the same, well, plots, or where to put the color values so I can tell which is which...
I tried combining both into one dataframe and using gather to inform the plots which was which but the coloring didn't work and it didn't work in general.
I tried matplot, but it told me they both have to have the same number of rows, which inclines me to believe it's not the right function for this.
The third thing I tried was:
par(mfrow=c(5,4))
i<-1
for (i in 1:26) {
plot(synthetic[i], col = "red")
points(full2[i], col = "blue")
}
But that failed as well. I would like all the plots to appear at once and not have to click through them.