search for: promptmethods

Displaying 20 results from an estimated 30 matches for "promptmethods".

2008 Mar 24
1
revision 44805 breaks promptMethods()
Hi, It seems that promptMethods() was changed in revision 44805 to include a call to "isGenericFunction" that at least as of revision 44861 does not exist as far as I can tell. This results in: could not find function "isGenericFunction" when evaluating e.g. promptMethods("myGeneric") Thanks, Mich...
2009 Nov 09
1
\\signature macro generated by promptMethods
Hello, promptMethods generate a macro for signatures, but the macro does not exist in the Rd parser. > setClass("track", + representation(x="numeric", y="numeric")) [1] "track" > setGeneric("foo", function(x){ standardGeneric("foo") } ) [1]...
2003 May 24
2
Re: R-devel Digest, Vol 3, Issue 23
...39;t pretend that the guide is perfect - I can already see problems with it - but it has proved adequate so far for our own use (writing the limma package) and has gained some more general acceptance from the Bioconductor community. I found it hard to use the skeleton documentation provided by promptMethods. Suppose for example that I wish to document a method for generic function 'foo' with argument list (x,y,...) for x of class 'bar1' and y of class 'bar2': 1. The skeleton .Rd file contains \alias{foo-methods}. If two or more more packages document methods for 'foo...
2001 Nov 30
0
New version of methods package
...y of those to tighten up some possible problems. For example, slot assignment now checks the validity of the value being assigned, and basic classes cannot be overriden. There is a version of the promptClass function by Vince Carey, to produce shell of documentation for a class. (There is also a promptMethods function to do the same for methods.) One point to note (it's a difference from Vince's original version) is that promptClass and promptMethods produce alias's specialized for class and method documentation. For example, if you do promptClass("track"), the resulting file is...
2004 Aug 16
1
promptClass("numeric")
Hi! Have written some functions with signature "numeric". eg. setGeneric("foo", function(object,...) standardGeneric("foo")) setMethod("foo",signature(object="numeric"),def = .... To generate the Rd file sceleton i use > promtClass("numeric") A shell of class documentation has been written to the file
2004 Sep 16
1
checking for _non-existing_ documentation entries.
Hi! I have renamed some functions and deleted others. I have noticed that R CMD check complains only about newly added functions, but documented non-anymore-existing functions seem not to matter. I knew about prompt and promptMethods promptClass. They are extremely useful if you are starting to write a package. But what with existing packages that have to be rewritten? Having code and documentation in one place would be a great help. Has anyone a tool which is able to generate from appropriately commented R-code files (e.g. &l...
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?
2008 Mar 30
1
package.skeleton.S4
...promptClass(item,filename = file.path(docs_dir, sprintf("%s.Rd",list0[item]))) }) listMethod <- unclass(getGenerics()) sapply(listMethod,function(metho){ if(any(sapply(list,function(lis){existsMethod(metho,lis)}))){ promptMethods(metho,filename = file.path(docs_dir, sprintf("%s.Rd",metho))) }else{} return(invisible()) }) })) if (inherits(yy, "try-error")){stop(yy)}else{} if (length(list.files(code_dir)) == 0){unlink(code_dir, recursive =...
2006 Oct 02
1
documenation duplication and proposed automatic tools
...nterface provided by a class (for B, foo and bar) 4) the various implementations of a particular method All of these can be discovered dynamically by the user. The problem is that current documentation system attempts to reproduce this dynamic information in static pages. prompt, promptClass and promptMethods functions generate templates that contain much of the information (or at least there supposed to; they seem to miss stuff for me, for example saying there are no methods when there are methods). This is helpful, but has two weaknesses. First, the class developer must enter very similar informatio...
2008 Mar 20
1
S4 : package creation
Hi the list, Using S4, how can we create a package? In "S4 Classes in 15 pages, more or less", they put all the classes definition in a function that will be called at the opening of the library and they add "by hand" a Rd file. Is it the only way ? Is there something like "S4.package.skeleton"? Thanks Christophe
2002 Aug 28
0
Fixes/additions to methods package
...ristics have been added to warn about what appear to be mistakes in writing generic functions (e.g., wrong name, no call to standardGeneric). The consequences of such errrors can be obscure. As with all heuristics, possibily warnings will occur when not appropriate. Let me know. 3. The function promptMethods() has been revised to generate aliases for individual methods, according to a proposed convention: setMethod("f", c("character", "numeric"), .....) would correspond to an entry in the documentation file of \alias{f,character,numeric-method} (The help function doesn...
2010 Jun 09
0
Documenting generic S4 replacement method for package building
...along = object at factors)) { low(object at factors[[i]]) = value[i] } return(object) } ) As far as I understand "2.1.3 Documenting S4 classes and methods (Writing R-exts)" http://cran.r-project.org/doc/manuals/R-exts.html#Documenting-S4-classes-and -methods I need to call promptMethods(lows) After that an S4 replacement method is documented in the same way as an S3 one: see the description of \method in Documenting functions. That's where I get lost. The example gives me \usage{ \method{print}{ts}(x, calendar, \dots) } If I do (see below for the whole file) \usage{ \meth...
2011 Jan 10
0
overfilled signature lines in documentation shell for methods
...for "[<-" are wrapped on two lines in 'Matrix-class.Rd' below and do not overfill the line, while in the second case they do. > library(Matrix) > promptClass("Matrix") A shell of class documentation has been written to the file 'Matrix-class.Rd'. > promptMethods("[<-",file="proba.Rd") A shell of methods documentation has been written to the file 'proba.Rd'. The syntax is very similar in both cases and uses \item{}{}, except that in the case of class the first argument is the function name (printed in bold). The signature...
2011 Feb 24
0
Rd, S4 classes and PDFs
Hi, I'm documenting a package that makes heavy use of S4 methods at the moment, and I'm having a hard time from keeping the PDF output of Rd from looking really terrible. First of all, what is the preferred way to actually document S4 methods? When I use promptClass/promptMethod, I get a style that doesn't use the \S4method macro and puts the entire function signature into a \item.
2009 Sep 17
1
package documentation of S4 methods
...t = "BList")}: Long output} } } I get the following warning (when I check the package for installation): * checking for missing documentation entries ... WARNING Undocumented code objects: showall All user-level objects in a package should have documentation entries. I then used promptMethods() to build a seperate documentation-file 'showall-methods.Rd'. If I then run the check I get the warning: * checking Rd files ... WARNING Rd files with duplicated alias 'showall,BList-method': BList-class.Rd showall-methods.Rd If I then remove the alias line '\alias{showall,...
2011 Dec 05
2
class extension and documentation
I've added a "backsolve" method to the bdsmatrix library. Per the Extending manual section 7.1 I've also added the following 3 lines along with my setMethod definitions for 2 classes. backsolve <- function(r, ...) UseMethod("backsolve") backsolve.default <- base:::backsolve formals(backsolve.default) <- c(formals(backsolve.default), alist(... = )) I've
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:
2004 Sep 21
0
checking for _non-existing_ -> documentation and sources at one place.
...to generate #Rd files? Would someone be interested in something similar. If #so let me know please. # # #/E # # # #*********** REPLY SEPARATOR *********** # #On 9/17/2004 at 9:07 AM Mark.Bravington@csiro.au wrote: # #>>>Wolski wrote: #>>> #>>>#I knew about prompt and promptMethods promptClass. They are #>>>#extremely useful if you are starting to write a package. But #>>>#what with existing packages that have to be rewritten? #>>># #>>>#Having code and documentation in one place would be a great #>>>#help. Has anyone a tool whi...
2009 Dec 14
0
R 2.10.1 is released
...x'. Reported by Bill Dunlap. o An error when unloadNamespace() attempted to run the .onUnload() function gave an error in the reporting function and so was not reported properly. o Text help rendering did not handle very long input lines properly. o promptMethods() generated signature documentation improperly. o pgamma(x, a, lower.tail=FALSE) and qgamma(..) are now considerably more accurate in some regions for very small 'a'. qgamma() now correctly returns 0 instead of NaN in similar extreme cases, and qgamma() no lon...
2009 Dec 14
0
R 2.10.1 is released
...x'. Reported by Bill Dunlap. o An error when unloadNamespace() attempted to run the .onUnload() function gave an error in the reporting function and so was not reported properly. o Text help rendering did not handle very long input lines properly. o promptMethods() generated signature documentation improperly. o pgamma(x, a, lower.tail=FALSE) and qgamma(..) are now considerably more accurate in some regions for very small 'a'. qgamma() now correctly returns 0 instead of NaN in similar extreme cases, and qgamma() no lon...