[Bioc-devel] help with imports for new package and other questions
lorena.pantano at gmail.com
Mon Aug 17 21:32:40 CEST 2015
Thanks a lot Hervé.
Your suggestions are perfect. I fully imported these classes because I
realized that it would be less chances of errors, as you say here.
I used that, and it is true that I am using these functions for dplyr.
The reason I tried to do with dplyr is was to summarize quicker.
Previously I was using data.table. I will just import the used functions
for dplyr, since, as you say, I am not using many functions.
Thanks for your help, really appreciate it.
On 08/17/2015 03:19 PM, Hervé Pagès wrote:
> Hi Lorena,
> In your particular case it seems to me that you're using dplyr
> internally for convenient data frame transformations (nothing that
> couldn't be done with plain R BTW), and that you're only using a few
> dplyr symbols for this. The codetoolsBioC package could be useful to
> help you identify these things and import them selectively. It seems
> to me that these things are: %>%, group_by, filter, and summarise,
> but I could be missing some. OTOH your package defines the IsomirDataSeq
> class which extends the SummarizedExperiment class, and thus relies
> largely on the GenomicRanges/SummarizedExperiment infrastructure.
> So I would highly recommend that you *fully* import BiocGenerics,
> S4Vectors, IRanges, and SummarizedExperiment. That will make the
> maintenance of your NAMESPACE file much easier in the long run than
> importing selectively from these packages.
> I also remember seeing selective imports from the methods package
> in NAMESPACE files generated with codetoolsBioC. Unless there is a
> good reason for doing so, these should be avoided and the methods
> package fully imported.
> On 08/14/2015 06:57 AM, Lo wrote:
>> I am trying to get right my new package
>> (http://github.com/lpantano/isomiRs). But I am having some problems with
>> the packages I import.
>> The main problem is that I get warnings while loading my packages
>> because some dplyr replaces functions in others packages like S4Vectors
>> and others.
>> This is my NAMESPACE
>> importFrom(plyr, join_all)
>> and these are the warnings:
>> ** preparing package for lazy loading
>> Warning: replacing previous import by ‘dplyr::slice’ when loading
>> Warning: replacing previous import by ‘dplyr::collapse’ when loading
>> Warning: replacing previous import by ‘dplyr::intersect’ when loading
>> Warning: replacing previous import by ‘dplyr::setdiff’ when loading
>> Warning: replacing previous import by ‘dplyr::union’ when loading
>> Warning: replacing previous import by ‘dplyr::rename’ when loading
>> Warning: replacing previous import by ‘dplyr::combine’ when loading
>> Warning: replacing previous import by ‘dplyr::desc’ when loading
>> Warning: replacing previous import by ‘gplots::space’ when loading
>> ** help
>> I need to solve this to avoid warnings. I tried something like use
>> `importFrom` to only import some functions but don't know if importFrom
>> is something I shouldn't use or I should.
>> I would also appreciate very much if some one can point me to the right
>> way to solve the following:
>> * I failed to create good documentation for some functions, data of my
>> package. Can anyone point me to a good example of a dataset
>> documentation, so I could create a good one for my dataset example.
>> * I have some problems with my coding style, like sometimes I have `=`
>> insted of `<-` and I forgot to add spaces like this ` <- `. Any one
>> knows of a plugin for any editor to help me find that. Because I am
>> always missing some of them by eye.
>> Thanks a lot in advance for any help in any point.
>> Bioc-devel at r-project.org mailing list
More information about the Bioc-devel