I am trying to generate a plot using heatmap.2
and print to a pdf_document using Rmarkdown.
Whether I call heatmap.2
from the console or in an .Rmd, the plot appears perfectly exactly as I want it. But additionally, I receive the error message:
## Error in plot.new(): figure margins too large
I can force knitr to continue processing using error=TRUE
, but the error message is still printed. I also have set
echo=FALSE, warning=FALSE, message=FALSE
which I thought would suppress the message, but it doesn't. I have tried using invisible()
as per this question, but it seems to do nothing.
I have also tried "fixing" the error by adjusting my plot parameters in heatmap.2
with no success-- it seems to complain when one of my columns in lhei
is too skinny. Since the plot looks fine, I am not worried about it unless there is no other way to suppress this error message.
How can I suppress this error message in my Rmarkdown pdf?