Thank you , Jameson! I checked all packages that need to be updated , one is ggplot2, and after updating the packages, the code went successfully.

GitHub-flavored Markdown & a sane subset of HTML is supported.