similar to: documenting methods for S4 objects

Displaying 20 results from an estimated 40000 matches similar to: "documenting methods for S4 objects"

2010 Jan 06
2
debugging package
I am trying to debug a package to submit it to CRAN and am getting a bunch of error messages. Most of the errors are because of the Rd files which were automatically populated by the package.skeleton function. I find the section on documentation to be pretty confusion in the R Extensions manual. Any help on getting these errors fixed would be hugely appreciated. Thanks. --Markus * checking for
2006 Apr 07
0
[R] documenting s4 methods in package
There are usually two directories involved in an install: the source directory and the install directory in R_HOME/library. The INSTALL procedure builds the package (usually in place in Windows, I'm not sure if that's the case in Unix) and installs it into the install directory by copying those files necessary to use it. REMOVE removes the install directory, cleaning up
2010 Jun 09
0
Documenting generic S4 replacement method for package building
Dear List Members, I'm struggling with the documentation of a generic S4 replacement method. I've created a S4 method "lows" via setGeneric("lows", function(object) standardGeneric("lows")) setGeneric("lows<-", function(object, value) standardGeneric("lows<-")) setMethod("lows", "myClass", function(object) {
2006 Apr 04
2
documenting s4 methods in package
Hi, I have written a package that contains many s4 generic functions and associated methods. I am having a lot of trouble getting R to build the help pages for these generic functions without reporting, "missing link(s): ~~fun~~, which means that it cannot find the appropriate function when code in the example section of the help is run. Right? After some playing around I can get it to
2006 Oct 30
0
documenting overridden methods (for S4 classes)
Hi, I'm trying to convert a package of mine to S4 classes and am stumbling when trying to correctly document some overriden methods. I have written methods that allow one to use 'length', and various logical operators (|, &, etc) on my objects. For example the code for my length method is: setMethod('length', "fingerprint", function(x) { x
2010 Jul 19
0
to extend data.frame or not ... that is the question
I am designing a package to analyze fire department data. I created an S4 class called CAD (short for Computer Aided Dispatch data) as part of this package that essentially extends the data.frame class. When the user initializes a CAD object, a data.frame object is broken down into seperate incident data and unit response data that are stored in separate slots. This separation is intentional
2010 Aug 25
1
Documenting S4 Methods
I'm in the process of converting some S3 methods to S4 methods. I have this function : setGeneric("enrichmentCalc", function(rs, organism, seqLen, ...){standardGeneric("enrichmentCalc")}) setMethod("enrichmentCalc", c("GenomeDataList", "BSgenome"), function(rs, organism, seqLen, ...) { ... ... ... })
2010 Feb 08
1
using setMethod or setGeneric to change S4 accessor symbol from @ to $
I created some S4 objects that are essentially data frame objects. The S4 object definitions were necessary to verify data integrity and force a standardized data format. I am, however, finding myself redefining all the typical generic functions so that I can still manipulate my S4 objects as if they were data frames ... I have used setMethod to set methods for "subset",
2010 Oct 26
1
S4 methods for rbind()
Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any number of arguments]. This is what I have so far: setGeneric(".rbind_pair",
2009 Oct 14
1
Cacheing computationally expensive getter methods for S4 objects
Hi, I was wondering if there was a way to store the results of a computationally expensive "getter" call on an S4 object, so that it is only calculated once for each object. Trivial example: let's say I want to cache the "expensive" area calculation of a square object. setClass("Square", representation( length='numeric',
2010 Sep 23
1
strange behaviour of callNextMethod in S4 methods
Hello, I experienced a strange behaviour of callNextMethod when used in either initialize or any other S4 function method definition. Help says callNextMethod calls the next inherited method for the current function from where it is called with the same actual (non missing) arguments. This is OK. The problem appears when some formal arguments (in particular, S4 objects) of this function are
2014 Jan 07
1
Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
For documentation we use a system that generates Rd files from special comments in the code. (inlinedocs). It is crucial to be able to get the defining source code for objects like methods to extract the comments from it. Here is an R session that shows how this works for several kinds of methods and (at the end of the session) how if fails for methods of "initialize" >
2012 Apr 12
1
R-2.15.0 and Exporting Methods Converted To S4 Generic
Late to the show on this release, unfortunately. One of our production packages no longer builds under R-2.15.0 with the following message. ** testing if installed package can be loaded Error: Function found when exporting methods from the namespace 'SuperCurve' which is not S4 generic: 'image' Possibly relevant clues follow: ## From R/AllGenerics.R if
2007 Aug 17
2
Overriding S4 methods in an installed package
Is it possible to override S4 methods in an installed package? The naive library("pkg") setMethod("foo", signature(obj = "bar"), function(obj , x, y) { new definition } , where="package:pkg") results in the error Error in setMethod("foo", signature(obj = "bar"), function(obj, : the environment "pkg" is
2006 Feb 07
0
S4 documentation
1. promptClass generated a file that included \section{Methods}{ No methods defined with class "mspathDistributedCalculator" in the signature. } Yet there are such methods. Is this a not-working yet feature, or is something funny going on (maybe I have definitions in the library and in the global workspace...)? 2. Is the \code{\link{myS4class-class}} the proper way to cross-reference a
2005 Mar 25
1
S4 methods semantics questions
Some quick questions about S4 methods. Does the typing of S4 methods mean that lazy evaluation is no longer possible? It seems that you would need to evaluate the arguments to determine their type at dispatch. Second, what role, if any, do default arguments play in S4 methods? I notice that you can put default arguments into generics but that the dispatch is still done on the type of the
2011 Nov 09
1
Define S4 methods for 'plot'
Hi the list I am creating a package and I have a problem to define a S4 method for plot. I define a class 'A' and a class 'B'. I want to define a function plot for signature c(A,missing) and another method plot for signature c(A,B). My code is the following : In /package/R/ directory: --- main.R --- setGeneric("plot",function(x,y,...){standardGeneric("plot")})
2004 Aug 07
1
memory usage of S4 methods
Hi, I have some problems with the memory usage of S4-generics. For example, I observed the following behaviour: > gc() used (Mb) gc trigger (Mb) Ncells 432091 11.6 531268 14.2 Vcells 116052 0.9 786432 6.0 > setClass("A",representation(x="numeric")); [1] "A" > setClass("B",representation(x="numeric")); [1] "B"
2009 Sep 17
1
package documentation of S4 methods
Hi, I'm new to this mailing list and to R-programming so if the question is stupid I apologize. I have to create a package, which includes an S4-class called "BList". For objects of this class I implemented a method "show", which displays the first 15 data-lines of the object. I further implemented a method "showall", which displays the whole data in the object.
2009 Mar 18
1
Why S4 methods of S3 'base' generics are not used in 'base' functions ?
Dear list, It seems that S4 methods defined for an S3 'base' generic are not used in 'base' functions. This can be problematic when 'base' functions start with something like 'as.matrix'. ### START R code setClass("classA", contains = "matrix", representation(realData = "numeric")) setMethod("as.matrix",