Closed
Description
A visual of the issue,
ggplot(mtcars, aes(wt, mpg)) + geom_point() + facet_grid(vs~I(am+1), margins=T)
The column (expression variable) margin is missing data!
The problem arises because these two lines depend on each other. The margins must be added with all the facet variables present in the data, yet the facet values must be computed with margins already computed and present in the data.