similar to: R CMD check: is it error to setMethod for class not currently defined?

Displaying 20 results from an estimated 10000 matches similar to: "R CMD check: is it error to setMethod for class not currently defined?"

2003 Feb 19
3
Rcmd check does not recognize formal generic function as code object
Dear all, I am trying to write a package using formal methods and classes from the methods package. I have not been able to get the package to pass rcmd check without warnings, because rcmd check does not recognize my generic functions as code objects and therefore queries why they have documentation entries. I have isolated the problem in a very small trivial example which I give below. I
2012 Jul 09
1
Using a function from splines.c in our package
Dear all, I'm writing to ask for advice as to best practice. A PhD student working with me is writing C++ code that we hope to make public as src code in our Bioconductor package edgeR. He wants to call the function fmm_spline, which is part of the source code for the stats package http://svn.r-project.org/R/trunk/src/library/stats/src/splines.c, from his C++ code. This function
2005 Jul 27
2
R 2.1.1: read.table processes C-style escapes (PR#8037)
In R 2.1.1, the default behaviour of scan() was changed to process all C-style escapes, even when a delimiter was specified using the 'sep' argument. A new argument 'allowEscapes' was introduced to turn this processing off. Because read.table() calls scan(), read.table() inherits the new default behaviour of scan() but without a way to turn it off. For example, reading a file
2005 Apr 22
1
Infinite degrees of freedom for F-distribution
This is just a suggestion/wish that it would be nice for the F-distribution functions to recognize limiting cases for infinite degrees of freedom, as the t-distribution functions already do. The t-distribution functions recognize that df=Inf is equivalent to the standard normal distribution: > pt(1,df=Inf) [1] 0.8413447 > pnorm(1) [1] 0.8413447 On the other hand, pf() will accept Inf
2003 Mar 26
1
formal methods and classes and capitalization conventions
Martin Maechler has suggested that I post this comment to r-devel. It was originally posted to bioconductor. --------------------------------- I'd like to raise the issue of a capitalization convention for naming objects in R. Almost everything in R used to be lowercase but recently there is increasing use of mixed upper/lower case to define names. There is potential for using the
2016 Aug 05
1
Will there be 2016 issues of The R Journal?
The R Journal home page doesn't make any promises about how frequently the journal will be published. Historically, though, there have been issues in June and December of each year. The June issue has always appeared by this time (6 August) in previous years. Has there been a change in the publication schedule? Are there still plans for a June 2016 issue? Thanks Gordon
2003 May 24
2
Interpretation of escaped characters in \examples{}
I've noticed a curious interpretation of escaped characters in \examples{} in .Rd files. For example, if I type files <- dir(pattern="\\.txt") at the R prompt, I will get a vector containing all file names in the current directory containing the string ".txt". If I put \examples{ files <- dir(pattern="\\.txt") } in an .Rd file of a package,
2011 Mar 16
1
Standardized Pearson residuals (and score tests)
Hi Peter and others, If it helps, I wrote a small function glm.scoretest() for the statmod package on CRAN to compute score tests from glm fits. The score test for adding a covariate, or any set of covariates, can be extracted very neatly from the standard glm output, although you probably already know that. Regards Gordon --------------------------------------------- Professor Gordon K
2012 Aug 05
2
setMethod sometimes fails to set package slot when signature has trailing 'ANY'
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,
2011 Jan 26
1
Problem with "setMethod" in R package
Dear all, My apologies for re-posting this question, but I have not found any solution to my problem so far. I also think that my post may have been overseen due to the posting time and high traffic on this list. I experience a problem in implementing a S4 class in a package and would appreciate your help in this matter. The class is implemented using Rcpp, which works well. I then extend
2005 Jul 22
0
boxplot() defaults {was "boxplot in extreme cases"}
>[Rd] boxplot() defaults {was "boxplot in extreme cases"} >Martin Maechler maechler at stat.math.ethz.ch >Mon Nov 8 10:36:42 CET 2004 > > AndyL> Try: > > AndyL> x <- list(x1=rep(c(0,1,2),c(10,20,40)), > x2=rep(c(0,1,2),c(10,40,20))) > AndyL> boxplot(x, pars=list(medpch=20, medcex=3)) > > AndyL> (Cf ?bxp, pointed to from
2003 May 23
3
Documenting S4 classes; debugging them
1. I'm putting together my first package that uses S4 classes and objects. I'd like to document them, but I'm not sure what the documentation should look like, and package.skeleton doesn't produce any at all for the classes or methods. Are there any good examples to follow? 2. How do I do the equivalent of debug(foo), when foo is an anonymous function being used as a method?
2003 Jul 09
2
Packages, generics, S3 and S4
My question has two parts. The first is with regard to the frame or environment in which generic functions are defined in packages. It seems as though they are defined (i.e. exist as objects) in frame 1, even when defined in a package. The following is a short example: setClass("track",representation(x="numeric",y="numeric")) plotTrack <- function(x,y,...)
2003 May 24
2
Re: R-devel Digest, Vol 3, Issue 23
I am another person who has had trouble documenting S4 classes and (particularly) methods. The methods package itself is pretty cool by the way, but it is a pity that there are as yet no guidelines on S4 in the "Writing R Extensions" document. I have actually put together a guide on S4 documentation myself for the use of my own lab which is at
2007 Jan 10
4
Trailing message on R CMD BATCH
Unix versions of R CMD BATCH have reported proc.time() unless the script ends in q(). E.g. if the input is 'search()' the output is > invisible(options(echo = TRUE)) > search() [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7]
2011 Dec 15
1
R CMD check fails to warn about undocumented classes and methods
In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" PkgA promotes 'unique' to a generic and exports that DESCRIPTION: Imports: methods R/f.R: setGeneric("unique") NAMESPACE: export(unique) and PkgB creates and exports a method on unique DESCRIPTION Imports: methods, PkgA R/f.R: setClass("B",
2009 Jul 09
1
class export in package creation / setClass / namespace?
Dear all, I have been trying to create an R package. This has been successfull until I tried to define classes. Currently, my procedure is the following: Start R, load the function and class definition >tmp <- function (x) {x} >setClass("rpa", contains = "list", where=topenv(parent.frame())) Use package skeleton to create directory structure:
2002 Sep 10
1
setGeneric(); R CMD check
1. Is it always the case that when defining generic functions in a package, the package needs to be installed as a binary package to avoid having the generic functions in the .GlobalEnv? 2. Defining a generic function in a "non-binary" package triggers a check warning $ R CMD check ... ... * checking for code/documentation mismatches ... WARNING Objects
2008 May 04
1
S4 / S3 / Sweave problem
I'm not sure if this as a bug or something I am doing wrong. It occurs in both 2.7.0 and 2.6.2. require("methods") setClassUnion("OptionalPOSIXct", c("POSIXct", "NULL")) setClass("TSmetax", representation(serIDs="character", ExtractionDate="OptionalPOSIXct" )) setGeneric("TSmetax", def= function(x,
2010 Jun 23
2
format: different S4 behavior in a package
R-Devel-ers: I have an S4 method that simply formats an object: setGeneric("formatMe", function(x) standardGeneric("formatMe")) setMethod("formatMe", "ANY", function(x) format(x)) If I issue the above in an R session, then define an S4 class with its own format method, I get the desired result: > setClass("A",contains="numeric")