Code Monkey home page Code Monkey logo

Comments (5)

yihui avatar yihui commented on June 2, 2024 1

I don't think this issue has anything to do with blogdown, since it's reproducible without blogdown. If you compile this Rmd example outside a blogdown project:

---
title: "tmap reprex"
output:
  html_document:
    keep_md: true
    self_contained: false
---

```{r load_libraries, message=FALSE, results='hide'}
library(tmap)
```

# Tmap in mode plot : OK

```{r tmap_plot, message=FALSE}
tmap_mode("plot")
tm_basemap() 
```

# Tmap in mode niew : NOK

```{r tmap_view, message=FALSE}
tmap_mode("view")
tm_basemap()
```

you will get

---
title: "tmap reprex"
output:
  html_document:
    keep_md: true
    self_contained: false
---


```r
library(tmap)
```

# Tmap in mode plot : OK


```r
tmap_mode("plot")
tm_basemap() 
```

![](test_files/figure-html/tmap_plot-1.png)<!-- -->

# Tmap in mode niew : NOK


```r
tmap_mode("view")
tm_basemap()
```

Again, I'm not familiar with tmap, and I have no idea what happened here. You may need to ask elsewhere. Thanks!

from blogdown.

cderv avatar cderv commented on June 2, 2024 1

I think this issue is already reported upstream at

So you should follow up there.

from blogdown.

Redcozmo avatar Redcozmo commented on June 2, 2024 1

ok thanks a lot @yihui and @cderv, I will follow up this tmap issue !!

from blogdown.

yihui avatar yihui commented on June 2, 2024

Your Rmd example throws an error from the chunk tmap_plot on my computer:

Quitting from lines 16-18 [tmap_plot] (index.Rmd)
Error:
! Either specify shp, or set mode to "view" with tmap_mode or ttm
Backtrace:
  1. base::eval(...)
  4. blogdown (local) `<fn>`(...)
  5. rmarkdown::render(...)
       at blogdown/R/render.R:210:3
  6. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
     ...
       at knitr/R/utils.R:876:7
 28. tmap:::knit_print.tmap(x, ...)
       at knitr/R/output.R:722:5
 29. tmap:::print_tmap(x, knit = TRUE, options = options, ...)
 30. tmap:::print_shortcut(x, interactive, in.shiny, args, knit)
Execution halted

I'm not familiar with the tmap package, and don't understand what the error means. If the example can compile on your computer, it will be easier if you can share the project (via a zip file here or a Github repo). I can take a look at your results.

from blogdown.

yihui avatar yihui commented on June 2, 2024

Never mind. I installed the dev version of tmap and the Rmd example compiles now. I'm investigating the issue you reported now.

from blogdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.