I am studying about plotting in R using ggplot while studying I came across two function name as facet_wrap and facet_grid.
Their syntax are
facet_wrap(~variable,ncol) ## the variable in which you split the plot
facet_grid(vertical ~ horizontal) the horizontal and vertical variable in which you split the plot.
I want to know where to use this function and how they are different.