Question Details

No question body available.

Tags

r ggplot2 nested purrr facet-wrap

Answers (1)

Accepted Answer Available
Accepted Answer
January 3, 2026 Score: 2 Rep: 130,747 Quality: High Completeness: 80%

As you already guessed you need to create the stripnested object and the plot in one go. Also, there is no need to wrap everything inside map. Instead, to make your life easier I would suggest defining the function outside of map. This also simplifies testing and debugging.

library(tidyverse)
library(ggh4x)
library(scales)

plotfct # qc: name of quality control; qcl: qc level arrange(qc, site) |> mutate( qc = as.character(qc), qcl = as.character(qcl) )

stripbackground map(plotfct)

enter image description here