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
Currently if you don't load tidyverse, then an error will be produced. It'd be worth adding import/importFrom tags to your functions to specify which external functions are needed and listing ggplot2 under the "Depends" field of the description. Setting it up this way would automatically load ggplot2 if the user loads ggbump, and the various tidyverse functions could be called from within your functions without making the user call it.
library(ggplot2)
library(ggbump)
#> Warning: package 'ggbump' was built under R version 4.3.1df<-data.frame(x=1:10, y=rnorm(10))
ggplot(df, mapping= aes(x=x, y=y))+
geom_point()+
geom_bump()
#> Warning: Computation failed in `stat_bump()`#> Caused by error in `arrange()`:#> ! could not find function "arrange"
Oh, actually, I'm not seeing this issue with the development version from github, but it's still better practice to specify the imports in the function though rather than only using the :: since it'll automatically add the your imports to the NAMESPACE file. I put in a pull request for the changes. Since you use dplyr pretty extensively I imported that whole package for each function that used it, but you could set it to import only the functions you're using.
Currently if you don't load tidyverse, then an error will be produced. It'd be worth adding import/importFrom tags to your functions to specify which external functions are needed and listing ggplot2 under the "Depends" field of the description. Setting it up this way would automatically load ggplot2 if the user loads ggbump, and the various tidyverse functions could be called from within your functions without making the user call it.
Created on 2023-07-11 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: