[Bioc-devel] help with imports for new package and other questions

Adrienne Stilp amstilp at uw.edu
Thu Aug 20 18:46:11 CEST 2015


Hi Lorena,

For your last question about coding style, you could look into the lintr package:
https://github.com/jimhester/lintr

You can run it either as an R function, or add it as a plugin to some editors. The developer, Jim Hester, is also part of the Bioconductor team!

Adrienne

> On Aug 14, 2015, at 6:57 AM, Lo <lorena.pantano at gmail.com> wrote:
> 
> Hi,
> 
> 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
> 
> import(BiocGenerics)
> import(S4Vectors)
> import(IRanges)
> import(GenomicRanges)
> import(SummarizedExperiment)
> import(dplyr)
> importFrom(plyr, join_all)
> import(DESeq2)
> import(methods)
> import(RColorBrewer)
> import(gplots)
> import(ggplot2)
> import(GGally)
> import(DiscriMiner)
> 
> and these are the warnings:
> 
> ** preparing package for lazy loading
> Warning: replacing previous import by ‘dplyr::slice’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::collapse’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::intersect’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::setdiff’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::union’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::rename’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::combine’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘dplyr::desc’ when loading ‘isomiRs’
> Warning: replacing previous import by ‘gplots::space’ when loading ‘isomiRs’
> ** 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.
> 
> Lorena
> 
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list