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

Vincent Carey stvjc at channing.harvard.edu
Fri Aug 14 16:19:46 CEST 2015


On Fri, Aug 14, 2015 at 10:03 AM, Kasper Daniel Hansen <
kasperdanielhansen at gmail.com> wrote:

> Indeed, you need to use importFrom to selectively import.
>
> In this process you'll realize how great it would be to have a function
> called
>   importEverythingFromExcept(  PACKAGE, NOT_THESE_FUNCTIONS)
> but last time I raised this issue on R-devel, I was gently shut down.
>
> In the meantime you should use the codetoolsBioC package (only available in
> subversion; you need to check it out and build/install it by hand).  This
> package has a function (writeNamespaceImports) which can analyze your code
> and tell you exactly which functions you use from which package.  Trust me,
> it'll save you days of work to use this.
>

I was trying to remember the location of this utility ... should be in our
developers guide

I don't see it here

http://bioconductor.org/developers/how-to/buildingPackagesForBioc/#namespace

Any chance that it could be promoted into R?  getting namespaces right can
be quite
time-consuming.


>
> SVN url is
>   svn co
>
> https://hedgehog.fhcrc.org/gentleman/bioconductor/trunk/madman/Rpacks/codetoolsBioC
>
> Best,
> Kasper
>
> On Fri, Aug 14, 2015 at 9: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
> >
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list