Working with teal.modules.general::tm_variable_browser, I have a plotting function that generates ggplots and accepts a ggplot2_args object as argument. I want the resulting plots to have one of the ggplot2 themes.
Error in teal.widgets::ggplot2_args(theme = user_theme) :
Assertion on 'names(theme)' failed: Must be a subset of {'line','rect','text','title','aspect.ratio','axis.title','axis.title.x','axis.title.x.top','axis.title.x.bottom','axis.title.y','axis.title.y.left','axis.title.y.right','axis.text','axis.text.x','axis.text.x.top','axis.text.x.bottom','axis.text.y','axis.text.y.left','axis.text.y.right','axis.ticks','axis.ticks.x','axis.ticks.x.top','axis.ticks.x.bottom','axis.ticks.y','axis.ticks.y.left','axis.ticks.y.right','axis.ticks.length','axis.ticks.length.x','axis.ticks.length.x.top','axis.ticks.length.x.bottom','axis.ticks.length.y','axis.ticks.length.y.left','axis.ticks.length.y.right','axis.line','axis.line.x','axis.line.x.top','axis.line.x.bottom','axis.line.y','axis.line.y.left','axis.line.y.right','legend.background','legend.margin','legend.spacing','legend.spacing.x','legend.spacing.y','legend.key','legend.key.size','legend.key.height','legend.key.width','legend.text','legend.text.align','legend.title','legend.title.align'
The assertion in ggplot2_args tests the names of the list passed to the theme argument against the formal arguments of ggplot2::theme. However, ggplot2::theme has a ... argument, so features not covered by formal arguments can be specified.
Currently this is the case with 7 of 9 themes and always the culprit is the strip.text.y.left field.
What happened?
Working with
teal.modules.general::tm_variable_browser
, I have a plotting function that generatesggplot
s and accepts aggplot2_args
object as argument. I want the resulting plots to have one of the ggplot2 themes.Within
tm_variable_browser_srv
I runwhich fails:
The assertion in
ggplot2_args
tests the names of the list passed to thetheme
argument against the formal arguments ofggplot2::theme
. However,ggplot2::theme
has a...
argument, so features not covered by formal arguments can be specified.Currently this is the case with 7 of 9 themes and always the culprit is the
strip.text.y.left
field.An issue was raised with the
ggplot2
team.NOTE: In this case the theme cannot be supplied with
because
parse_ggplot2_args
returns a list of calls and not aggplot2_args
object, which the plotting function expects.sessionInfo()
No response
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy