From ligges at statistik.tu-dortmund.de  Fri Apr 15 17:42:45 2011
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Fri, 15 Apr 2011 17:42:45 +0200
Subject: [Rd] DESCRIPTION file and Rd examples
In-Reply-To: <20110415130021.BLM73721@gimr.garvan.unsw.edu.au>
References: <20110415130021.BLM73721@gimr.garvan.unsw.edu.au>
Message-ID: <4DA86775.6050604@statistik.tu-dortmund.de>

It would probably be helpful if you could point us to the source version 
of your package so that we can take a look what happens.
Which version of R, and the other required packages are you talking about?

Uwe Ligges




On 15.04.2011 05:00, Dario Strbenac wrote:
> I have a confusing error from R CMD check that I don't get when running the example manually by hand.
>
> In the \examples section of an Rd file, I create a GRanges object, then I call a function with the GRanges object, whose first 2 lines are
>
>      require(GenomicRanges)
>      annoDF<- as.data.frame(anno) # anno is the GRanges object.
>
> and that second line gives:
>
> Error in as.data.frame.default(anno) :
>    cannot coerce class 'structure("GRanges", package = "GenomicRanges")' into a data.frame
> Calls: annoGR2DF ... annoGR2DF ->  .local ->  as.data.frame ->  as.data.frame.default
>
> I have GenomicRanges listed in my Imports: field, and IRanges in the Suggests: of the DESCRIPTION file (it's require()d elsewhere). I'm trying to avoid putting packages in Depends: , so my package loads fast. Any tips of what I'm not understanding properly ?
>
> Thanks.
>
> --------------------------------------
> Dario Strbenac
> Research Assistant
> Cancer Epigenetics
> Garvan Institute of Medical Research
> Darlinghurst NSW 2010
> Australia
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] DESCRIPTION file and Rd examples
Uwe Ligges