Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_article() fails with large chunk sizes, no errors reported when setting quiet=FALSE #2342

Closed
marine-ecologist opened this issue Sep 11, 2023 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@marine-ecologist
Copy link

marine-ecologist commented Sep 11, 2023

Issue

  • pkgdown::build_articles() fails with large chunk sizes whereas rmarkdown::render() works fine
  • article fails to render any code or text beyond the failed chunk
  • no errors are reported with build_article(quiet=FALSE)

more details:

  • reproducible example below
  • sf object and plotted with tmap fails at ~9300000 bytes
  • not package specific, reproducible with leaflet / htmlwidget objects as well as tmap
  • likely related to related to this issue

example Rmd file below.

Run with:
pkgdown::build_article("sf-multi-map", quiet=FALSE) - ❌
rmarkdown::render("vignettes/sf-multi-map.Rmd") - ✅

---
title: "sf multi-map"
output: html_document
---
### runs fine with 1000 rows (1260632 bytes)

` ``{r}

library(sf)
library(tmap)


nc <- st_read(system.file("shape/nc.shp", package="sf"))
merged <- do.call(rbind, rep(list(nc), 10))

object.size(merged)
nrow(merged)

tmap_mode("view") +
  tm_shape(merged) +
  tm_fill(col="NAME", lwd = 0.2) 

  
```

### no map with 7500 rows (9331032 bytes)

```{r}

library(sf)
library(tmap)


nc <- st_read(system.file("shape/nc.shp", package="sf"))
merged <- do.call(rbind, rep(list(nc), 75))

object.size(merged)
nrow(merged)

tmap_mode("view") +
   tm_shape(merged) +
   tm_fill(col="NAME", lwd = 0.2)


```




### No map with two layers of 4000 + 4000 rows:

```{r}

library(sf)
library(tmap)


nc <- st_read(system.file("shape/nc.shp", package="sf"))
merged <- do.call(rbind, rep(list(nc), 40))
merged2 <- do.call(rbind, rep(list(nc), 40))

nrow(merged)
nrow(merged2)

tmap_mode("view") +
  tm_shape(merged) +
  tm_fill(col="NAME", lwd = 0.2)  +
 tm_shape(merged2) +
  tm_fill(col="CNTY_", lwd = 0.2) 


  
```

@maelle maelle added the bug an unexpected problem or unintended behavior label Sep 29, 2023
@hadley
Copy link
Member

hadley commented Oct 30, 2023

Given that it's probably unlikely you'll want to include a 10 MB file to view a vignette, I think this is unfortunately out of scope for pkgdown. It's our policy to close such issues to help stay focussed on the biggest problems, but the issue is still indexed by google, so if other people hit it, they'll be able to find it, and we can consider reopen it if it turns out to be a common problem. Thanks for reporting and I'm sorry we couldn't help more 😞.

@hadley hadley closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants