search for: findfunction

Displaying 6 results from an estimated 6 matches for "findfunction".

2009 Sep 28
1
model.matrix troubles with AlgDesign
...nformation (which?) within that function (I believe that the relevant portion of the code is included below): expand.formula <- function (frml, varNames, const = TRUE, numerics = NULL) { ## omitted quite a bit of code ##... frml <- deparse(frml, width = 500) while ((0 != (pos <- findFunction("quad", frml))[1]) || (0 != (pos <- findFunction("cubicS", frml))[1]) || (0 != (pos <- findFunction("cubic", frml))[1])) { prog <- substr(frml, pos[1], pos[2]) strHead <- substr(frml, 1, pos[1] - 1) strTail <- su...
2007 Jan 31
2
Problems with definitions of S4-generics
...t;foofunc")}) setGeneric("barfunc", def=function(object) {standardGeneric("barfunc")}) #### Okay, let's start. #### Fist the correct part ## Do some tests to see if the generic is present, ## and have a look at some details isGeneric("foofunc") # [1] TRUE findFunction("foofunc") # [[1]] # <environment: R_GlobalEnv> foofunc # nonstandardGenericFunction for "foofunc" defined from package ".GlobalEnv" # # function (object) # { # standardGeneric("foofunc") # } # <environment: 0x293bbb8> # Methods may be defi...
2005 Mar 10
1
how to view the syntax of a method which is not a generic method
....varExp by using the showMethods command. Here's what happened. > showMethods("initialize.varExp") Function "initialize.varExp": <not a generic function> So I assume that inialize.varExp is not a generic method. I also have the following information. > findFunction("initialize.varExp") list() and > findFunction("varExp") [[1]] <environment: package:nlme> attr(,"name") [1] "package:nlme" attr(,"path") [1] "C:/PROGRA~1/R/rw1091/library/nlme" So I'm guessing I somehow need to tell the s...
2017 Jan 09
1
problem with print.generic(x)deparse(substitute(x))
...t;> k > [1] "x" Thanks. Permit me to ask my real question: Is there a way to modify print.findFn{sos} so I can print "k" in the second line of the HTML from the following: (k <- findFn('spline', 1)) Currently, the HTML starts as follows: findFunction Results call: findFn(string = "spline", maxPages = 1) I want it to start as follows: findFn Results call: (k <- findFn(string = "spline", maxPages = 1)) For a package summary: installPackages(k); writeFindFn2xls(k) When I added "ds <- deparse(sub...
2003 Sep 27
2
does isGeneric work differently in 1.8.0 ?
Hello, the last command (isGeneric) in following R-code (attached) produces different output, depending on wheter 1.8.0 alpha or 1.7.1 is used. Is that to be expected ? Both R Versions were started with option vanilla --------------------------------------------------- R.1.7.1: --------------------------------------------------- > version _ platform i686-pc-linux-gnu arch i686
2017 Jan 09
2
problem with print.generic(x)deparse(substitute(x))
Hi, All: I'm having trouble getting deparse(substitute(x)) inside print.generic to consistently I'm having trouble getting a print.something to work consistently. Consider the following toy example: # Define an object of class 'dum' k <- 1 class(k) <- 'dum' str(k) # as expected # Define print.dum print.dum <- function(x, ...)