0

I am working on a project that involves including maps in a final R markdown document (html or pdf). but, an error pops up with my map_data function after trying to knit. I have installed all of the according packages, so I don't think that is the problem either. Any ideas? Thanks

usa <- map_data("usa")
dim(usa)
head(usa)

Could not find function "map_data"

Phil
  • 7,287
  • 3
  • 36
  • 66
  • 1
    Welcome to SO. Unfortunately this is not a [reproducible issue](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) so it's hard to help you. However a few things to try: clear your environment and run your .RMD from the top to catch any errors. Also ensure that the package is actually loaded in this document and not added to your environment somewhere else or manually. – Dan Adams Jan 12 '22 at 03:21
  • 1
    Make sure to include `library(package)` with the name of whatever package that function comes from within the rmd document. – Phil Jan 12 '22 at 04:39

0 Answers0