Relative Content

Tag Archive for rggplot2scopeexpressionpurrr

Scope of identifiers in R formulas/expressions

I’m using as.ggplot from ggplotify to wrap some chord diagrams from the circlize package so I can arrange them nicely using patchwork. However, since as.ggplot takes a formula or expression as an argument, it seems to require that any identifiers are available in the global scope. I can get around this by assigning them globally with <<-, but this seems hacky. Is there another way around this?