I have a dataframe with 8 columns (8 variables) and 1000's of observations. I would like to plot a histogram and a boxplot for each variable in the same panel.
For example
h1 h2 h3 h4
b1 b2 b3 b4
h5 h6 h7 h8
b5 b6 b7 b8
where hn= histogram of variable n. and bn= boxplot of variable n.
I tried boxplot(dataframe)
hist(dataframe)
But the boxplots are located in the same chart and I get the following error for the histogram:
Error in hist.default(dataframe) = 'x' must be numeric
Thanks in advance!
pd. is it possible to add a color palette to this panel?