I've written a package in which the following is in the imports:
Rcpp (>= 0.11.0),ggplot2,grid,gridExtra,png,methods,ape,Biostrings
I have read this artcle about how R searches: how R searches, and I figured basically unless there's a very good reason not to - it's is safer to import packages that mine depends on, and not to put them in the dependencies.
However I'm seeing the error whe I use my package:
could not find function "rasterGrob"
My suspicion is that ggplot Depends on Grid, so I have to make my package Depend on grid too, so as the grid is attached and so 'package:grid' will be seen when executing search()
.
A). Is my understanding correct? and B). So do I simply have to also Depend on Grid, or is it a better idea to Depend on ggplot2 also?
Thanks, Ben.