On 04/19/2011 08:00 PM, Dario Strbenac wrote:
Ah, I think it's happening because I have
setOldClass(AffymetrixCelSet) in my package.
if AffymetrixCelSet is from aroma.affymetrix, then the line above results in
> setOldClass(AffymetrixCelSet)
Error in x[length(x):1L] : object of type 'closure' is not subsettable
maybe you meant
setOldClass("AffymetrixCelSet")
but if I put that in a package that either Depends: or not on
aroma.affymetrix then I don't see the warning in your original report.
I'm not sure you've diagnosed the problem correctly?
Martin
I guess I need to use there where argument. But how do I have this call outside
any S4 functions, but without having to load aroma.affymetrix when my package
loads ?
---- Original message ----
Date: Tue, 19 Apr 2011 19:23:20 -0700
From: Martin Morgan<mtmor...@fhcrc.org>
Subject: Re: [Rd] Package Name Not Found Warning
To: d.strbe...@garvan.org.au
Cc: r-devel@r-project.org
On 04/19/2011 05:00 PM, Dario Strbenac wrote:
Hello,
I've got a DESCRIPTION file with a the first line:
Package: Repitools
But, when I run R CMD INSTALL Repitools I get:
* installing *source* package Repitools ...
** R
** data
** inst
** preparing package for lazy loading
Warning in FUN(X[[1L]], ...) :
Created a package name, "2011-04-20 09:05:40", when none found
For what it's worth, this comes up when a class is being created in an
environment that is not the global environment or does not have a
variable .packageName, apparently added early in the name space creation
process. You can mimic this with
setClass("A", where=new.env())
or
local({ setClass("A", where=environment()) })
Kind of doubt whether you've actually done something like that in your
package, but maybe it twigs something...
Also, if you add
trace(methods::getPacakgeName, quote(print(where)))
or
trace(warning, quote(print(sys.calls())))
somewhere early in your package (the top of the first file to be
collated) you'll get messages that might point to where things are going
wrong.
Hope that helps,
Martin
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
* DONE (Repitools)
It looks like it knows about the package name at the start and end of the
process, but not in the middle of it.
Loading the packing in an R session and looking at the sessionInfo shows the
package name was properly processed. Is this a spurious warning ?
I'm using:
R version 2.13.0 (2011-04-13)
Platform: x86_64-unknown-linux-gnu (64-bit) (actually Ubuntu 10.10)
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia
______________________________________________
R-devel@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
--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel