Unable to knit .Rmd to PDF and Word - With an error message after running mapview() on RStudio Cloud

Hi,

My project includes a mapview() function from mapview package.

The project (contains the Rmarkdown and other files) can be accessed here Posit Cloud. I could knit the project to HTML, pdf and word on my laptop. But the problem is, I could only knit to HTML on RStudio Cloud. If I try to knit to PDF or word, I will receive this error message.


I could trace the problem to Line 380 which is this - mapview(nc["BIR74"], col.regions = sf.colors(10)). If I remove this line or insert a hashtag at the front of the function, then I could knit to PDF and Word.

My guess is mapview() triggers the error. How could I print a map using the mapview() on PDF in RStudio Cloud. Any help is very much appreciated.

KIM

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.