You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x <- chevron::run(chevron::mng01, chevron::syn_data, dataset = "adlb")
x <- lapply(x, ggplot2::ggplotGrob)
res <- tern::decorate_grob_set(
x,
titles = "title",
footnotes = c("", "a a") # empty string and space
)
#> Error in if (grid::convertWidth(linewidth + gapwidth + width_i, grid::unitType(width), : missing value where TRUE/FALSE needed
This works
res <- tern::decorate_grob_set(
x,
titles = "title",
footnotes = c(" ", "a a") # space and space
)
res <- tern::decorate_grob_set(
x,
titles = "title",
footnotes = c("", "axa") # empty string and no space
)
res <- tern::decorate_grob_set(
x,
titles = "title",
footnotes = c(" ", "axa") # blank space and no space
)
res <- tern::decorate_grob_set(
x,
titles = "title",
footnotes = c("a a", "") # blank space and empty string
)
The only condition where the function fails is when the first element of the vector is empty string and the other contains a blank space.
also when footnotes is NULL, the error is not very user friendly
x <- chevron::run(chevron::mng01, chevron::syn_data, dataset = "adlb")
x <- lapply(x, ggplot2::ggplotGrob)
res <- tern::decorate_grob_set(
x,
titles = "title",
footnotes = NULL
)
#> Error in strsplit(text, " "): non-character argument
Created on 2024-06-18 with [reprex v2.1.0](https://reprex.tidyverse.org/)
Have fun!
sessionInfo()
No response
Relevant log output
> packageVersion("tern")
[1] ‘0.9.4.9009’
Code of Conduct
I agree to follow this project's Code of Conduct.
Contribution Guidelines
I agree to follow this project's Contribution Guidelines.
Security Policy
I agree to follow this project's Security Policy.
The text was updated successfully, but these errors were encountered:
What happened?
This is a funny one:
This fails:
This works
The only condition where the function fails is when the first element of the vector is empty string and the other contains a blank space.
also when footnotes is
NULL
, the error is not very user friendlyHave fun!
sessionInfo()
No response
Relevant log output
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: