Re: [Rd] Defining Version in R Package

2012-08-07 Thread Uwe Ligges



On 06.08.2012 15:30, [R]andall wrote:

Hello Liste[R]s,

I defined a version in a recent package using the following entries:

DESCRIPTION FILE:
/Depends: R(>= 2.14.2), rjson, RgoogleMaps/

*.rd FILE: (which I was under the impression is the package version, not the
R requirement)
/\details{
\tabular{ll}{
Package: \tab geoPlot\cr
Type: \tab Package\cr
Version: \tab 2.0\cr
Date: \tab 2012-07-24\cr
License: \tab GPL-2\cr
}/

When I try to install the package, I get the following error:
/Warning message:
package ‘geoPlot’ is not available (for R version 2.15.1) /

Obviously, I have missed something?  Can someone point me in the right
direction?



Nothing for R-devel, actually. This is more an R-help question.
You provide insufficient information, but let me guess you are running 
Windows: The Windows binary package for the R-2.15.x versions of R is 
not yet available on CRAN. You can expect it to appear on the master 
within 72 hours.


Best,
Uwe Ligges









Thanks.



--
View this message in context: 
http://r.789695.n4.nabble.com/Defining-Version-in-R-Package-tp4639281.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] setMethod sometimes fails to set package slot when signature has trailing 'ANY'

2012-08-07 Thread Martin Morgan

On 08/07/2012 02:43 PM, John Chambers wrote:

Good catch.  This should have been fixed in r-devel, revision 60192.  If
nothing bad results in other tests, we'll port it to the current patched
version.


Thank you for the fix. Martin



Thanks,
   John

On 8/5/12 4:31 PM, Martin Morgan wrote:

after this

  setClass("A")

  setGeneric("bar", function(x, y) standardGeneric("bar"))
  setMethod(bar, signature(x="A", y="A"), function(x, y) {})
  setMethod(bar, signature(x="A", y="ANY"), function(x, y) {})

the method for signature c("A", "A") contains package information

> str(getMethod(bar, c("A", "A")))
Formal class 'MethodDefinition' [package "methods"] with 4 slots
  ..@ .Data  :function (x, y)
  ..@ target :Formal class 'signature' [package "methods"] with 3 slots
  .. .. ..@ .Data  : chr [1:2] "A" "A"
  .. .. ..@ names  : chr [1:2] "x" "y"
  .. .. ..@ package: chr [1:2] ".GlobalEnv" ".GlobalEnv"
  ..@ defined:Formal class 'signature' [package "methods"] with 3 slots
  .. .. ..@ .Data  : chr [1:2] "A" "A"
  .. .. ..@ names  : chr [1:2] "x" "y"
  .. .. ..@ package: chr [1:2] ".GlobalEnv" ".GlobalEnv"
  ..@ generic: atomic [1:1] bar
  .. ..- attr(*, "package")= chr ".GlobalEnv"

but the method for signature c("A", "ANY") does not

> str(getMethod(bar, c("A", "ANY")))
Formal class 'MethodDefinition' [package "methods"] with 4 slots
  ..@ .Data  :function (x, y)
  ..@ target :Formal class 'signature' [package "methods"] with 3 slots
  .. .. ..@ .Data  : chr [1:2] "A" "ANY"
  .. .. ..@ names  : chr [1:2] "x" "y"
  .. .. ..@ package: chr [1:2] "" ""
  ..@ defined:Formal class 'signature' [package "methods"] with 3 slots
  .. .. ..@ .Data  : chr [1:2] "A" "ANY"
  .. .. ..@ names  : chr [1:2] "x" "y"
  .. .. ..@ package: chr [1:2] "" ""
  ..@ generic: atomic [1:1] bar
  .. ..- attr(*, "package")= chr ".GlobalEnv"

This does not occur when the order of setMethod calls is reversed. The
reason is that the package information added when
methods/R/Methods.R:552 calls matchSignature are stripped (because
matchSignature returns a vector with trailing 'ANY' classes removed)
by the call to .matchSigLength at line 603.

The context for this is the thread starting at

https://stat.ethz.ch/pipermail/bioconductor/2012-August/047241.html

where a complicated package dependency and attempt to redefine an
existing method leads to

Error : package slot missing from signature for generic 'sampleNames<-'
and classes LumiBatch, ANY
cannot use with duplicate class names (the package may need to be
re-installed)

Martin





--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel