Re: [R-pkg-devel] Package fails to build on CRAN Windows server: rtracklayer version too new

2021-04-23 Thread Tim Stuart
Hi Henrik, Thanks for your explanation, that does indeed make sense. I will try to track down the bioc package dependency that's setting the explicit rtracklayer version dependency and go from there... The fact that Bioconductor allows packages to be released without successfully building on Wind

Re: [R-pkg-devel] Using ggplot2 within another package

2021-04-23 Thread Tiago Olivoto
Hi everyone, One suggestion would be import ggplot2 and using tidy eval operators to create a function. One simple reproducible example would be library(ggplot2) my_hist <- function(df, var){ ggplot(df, aes({{var}})) + geom_histogram() } df <- data.frame(my_var = rnorm(400, 10, 2)) my_hist(

Re: [R-pkg-devel] Using ggplot2 within another package

2021-04-23 Thread Mike Collyer
Hi Kevin, I recently developed a plot function in a package that used ggplot and ran into the same problem. I overcame the problem with a first line of (useless) code as myX <- myY <- NULL I found the solution inelegant but it worked. cheers! Mike > On Apr 22, 2021, at 4:28 PM, Kevin R. Coom