DS4PS / ddmp-uw-class-spring-2019

Data-Driven Management & Policy Course at UW, Spring 2019
https://ds4ps.github.io/ddmp-uw-class-spring-2019/
4 stars 3 forks source link

Issue with tm_shape #11

Closed leigh32michael closed 5 years ago

leigh32michael commented 5 years ago

Hi all,

I'm experiencing what I think is a really simple error, but I can't find a solution. (I ran into this issue in the lab last week, too and figured out some workaround, but now I can't remember what I did to get it right.)

I've copied Eric's code for the lab into a new R markdown. I changed the output so that it pulls data from my downloaded Seattle pet licensing file ("/Users/lmichael/Desktop/LM/Seattle_Pet_Licenses.csv")

But when I knit the code, all is well until the chunk starting at line 78:

Screen Shot 2019-05-19 at 12 47 00 PM

I get this error message:

Screen Shot 2019-05-19 at 12 47 47 PM

I have installed the tmap package (install.packages("tmap")), so I don't understand why the action halts when I try to call the function "tm_shape."

I'd really appreciate any advice! I'm at a bit of a stall with the lab until I can get the original to successfully load.. Thank you!

ejvanholm commented 5 years ago

Do you need to add library(tmap) so the function is loaded when you knit?

leigh32michael commented 5 years ago

palm to forehead — you've got it. Thank you!