Unset existing scale_fill_discrete in ggplot2 or suppress message for new scale
问题 I am currently trying to knit an R markdown document to html (or pdf) where in a certain chunck I generate multiple plots. I specify the captions through the fig.cap argument in the chunck options with a vector of the same length as the number of plots. However, for this to work the cunck option message has to be TRUE . The issue starts when a ggplot2 object is generated by a function in the chucnk and I want to apply a new fill with viridis::scale_fill_viridis . Which is fine, but inevitably