pkgdown::build_articles()fails with large chunk sizesrmarkdown::render()works fine- article fails to render any code or text beyond the failed chunk
- no errors are reported with
build_article(quiet=FALSE)
- reproducible example below
sfobject and plotted with tmap fails at ~9300000 bytes- not package specific, reproducible with
leaflet/htmlwidgetobjects as well astmap
Run with:
pkgdown::build_article(... quiet=FALSE)- failsrmarkdown::render(...)- success
---
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, error = TRUE}
library(sf)
library(tmap)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
merged <- do.call(rbind, rep(list(nc), 90))
object.size(merged)
nrow(merged)
tmap_mode("view") +
tm_shape(merged) +
tm_fill(col="NAME", lwd = 0.2)
```
## no map with 7500 rows with leaflet (9331032 bytes)
```{r, error = TRUE}
library(sf)
library(tmap)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
merged <- do.call(rbind, rep(list(nc), 90))
object.size(merged)
nrow(merged)
tmp <- tmap_mode("view") +
tm_shape(merged) +
tm_fill(col="NAME", lwd = 0.2)
tmp2 <- tmap_leaflet(tmp)
object.size(tmp2)
tmp2
```
