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
DESCRIPTION file and Rd examples
6 messages · Dario Strbenac, Uwe Ligges, Simon Urbanek +3 more
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
On Apr 14, 2011, at 11:00 PM, 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)
require() is doesn't guarantee that the package will load, so I think what you meant to write was more
if (require(GenomicRanges, quietly=TRUE)) {
...
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
On 04/15/2011 11:18 AM, Simon Urbanek wrote:
On Apr 14, 2011, at 11:00 PM, 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)
require() is doesn't guarantee that the package will load, so I think what you meant to write was more
if (require(GenomicRanges, quietly=TRUE)) {
...
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
Try IRanges::as.data.frame(anno) I'm guessing that your call finds base::as.data.frame, perhaps because some earlier example has already require'd GenomicRanges, and that it's definition of as.data.frame has been masked some time in between. It's too complicated to debug in detail; R CMD check produces a file <pkg>.Rcheck/<pkg>-Ex.R that contains the compiled example code, and it is in the evaluation of this file that the error occurs. So you could dissect it to discover the gory details. Martin
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
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793
2 days later
Does anyone have any pointers on troubleshooting an R installation on a Windows 2008 server? I had it running on a Windows 2003 server after many permissions updates to the server, but I'm stumped on getting it to run on 2008. --The error I'm getting when I run the StatConnector Test is: Loading StatConnector Server... Done Initializing R...Function call failed Code: -2147221485 Text: installation problem: unable to load connector Releasing StatConnector Server...Done --With a popup that just says: "Method '~' of object '~' failed" --I've run through all the documented troubleshooting I can find - no change. I've verified the %R_HOME%, registry key corresponding to your R installation, and %PATH% mentioned in the documentation already. --I've also tried reinstalling from scratch twice just in case. Any suggestions would be appreciated Shawna Job Sr. Systems Analyst PSOB Desk: 971-673-0128 OIS/AMS
This isn't 'R fails', it is 'StatConnector' fails. That project is nothing to do with this list, so please don't ask here for free consultancy on it (and fail to give any of the information asked for in our posting guide).
On Mon, 18 Apr 2011, Shawna JOB wrote:
Does anyone have any pointers on troubleshooting an R installation on a Windows 2008 server? I had it running on a Windows 2003 server after many permissions updates to the server, but I'm stumped on getting it to run on 2008. --The error I'm getting when I run the StatConnector Test is: Loading StatConnector Server... Done Initializing R...Function call failed Code: -2147221485 Text: installation problem: unable to load connector Releasing StatConnector Server...Done --With a popup that just says: "Method '~' of object '~' failed" --I've run through all the documented troubleshooting I can find - no change. I've verified the %R_HOME%, registry key corresponding to your R installation, and %PATH% mentioned in the documentation already. --I've also tried reinstalling from scratch twice just in case. Any suggestions would be appreciated Shawna Job Sr. Systems Analyst PSOB Desk: 971-673-0128 OIS/AMS
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595