Running the last ggplot above will give you the error:
Error in if (aspectRatio > lastAspectRatio) { :
missing value where TRUE/FALSE needed
It turns out that I had a 0 value in the data I mapped to the area aesthetic, which led to a 0 or ∞ in the aspectRatio calculation. It might help to add a test to ensure all values of that aesthetic mapping are > 0 and an error message similar to "Data mapped to area aesthetic contains a 0. Please remove rows that contain 0 or choose another area variable.".
Just a suggestion - thanks for creating this great package.
This is a minor nit, but I spent way longer than I should have troubleshooting the error message.
The code below will recreate the error I experienced:
Running the last ggplot above will give you the error:
It turns out that I had a 0 value in the data I mapped to the area aesthetic, which led to a 0 or ∞ in the aspectRatio calculation. It might help to add a test to ensure all values of that aesthetic mapping are > 0 and an error message similar to "Data mapped to area aesthetic contains a 0. Please remove rows that contain 0 or choose another area variable.".
Just a suggestion - thanks for creating this great package.