Re: [Rd] request for additional test in R CMD check

2006-10-17 Thread Seth Falcon
here are reasonable cases where a function is redefined based on available packages, for example. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing list htt

[Rd] Caching bug with showMethods?

2006-10-17 Thread Seth Falcon
showMethods isn't reporting inherited methods when it is first called. The methods are there and after calling them, showMethods gives the right output. Here is an example (using R-devel r39647): setClass("A", representation(x="numeric"), prototype=list(x=1)) setClass("B", contains="A"

Re: [Rd] Caching bug with showMethods?

2006-10-18 Thread Seth Falcon
scover "what can be done" with an instance of a given class. showMethods is very close to being that tool, but the interaction with the method caching makes it confusing (until one has a solid understanding of the method caching, but IMHO this isn't something a user should need to k

Re: [Rd] Error condition in evaluating a promise

2006-10-18 Thread Seth Falcon
Simon Urbanek <[EMAIL PROTECTED]> writes: > thanks, but this is not what I want (the symbols in the environment > are invisible outside) and it has nothing to do with the question I > posed: as I was saying in the previous e-mail the point is to have > exported variables in a namespace, but t

[Rd] Warnings about unrecognized escapes in Rd

2006-10-18 Thread Seth Falcon
Hi, The warning that was recently added to R-devel about unrecognized escapes has been very helpful in identifying a number of incorrectly specified regular expressions. We are, however, seeing warning messages for Rd files that contiain '\_' and I think that _is_ a recognized escape. Can the ch

Re: [Rd] Caching bug with showMethods?

2006-10-18 Thread Seth Falcon
John Chambers <[EMAIL PROTECTED]> writes: > If showMethods() were extended in this way but consistent with its > behavior now, you would potentially get a mess (and do a lot of > computation). Any method with "ANY" in any element of its signature > qualifies (in particular, all default methods).

Re: [Rd] Error condition in evaluating a promise

2006-10-18 Thread Seth Falcon
"Roger D. Peng" <[EMAIL PROTECTED]> writes: > I've encountered a (I think) related problem when using promises to load > relatively large datasets. For example something like > > delayedAssign("x", getBigDataset()) > > runs into the same problem if you hit Ctrl-C while 'x' is being evaluated for

Re: [Rd] Warnings about unrecognized escapes in Rd

2006-10-18 Thread Seth Falcon
Peter Dalgaard <[EMAIL PROTECTED]> writes: > Er, do you have a minimal example showing the behaviour? It's not > quite clear whether you have this happening everywhere or only in > example sections, formulas or...? Oups. The example I was looking at has \_ in a number of places in the Rd files so

Re: [Rd] Warnings about unrecognized escapes in Rd

2006-10-18 Thread Seth Falcon
Seth Falcon <[EMAIL PROTECTED]> writes: > Peter Dalgaard <[EMAIL PROTECTED]> writes: >> Er, do you have a minimal example showing the behaviour? It's not >> quite clear whether you have this happening everywhere or only in >> example sections, formulas or...

Re: [Rd] Getting hold of a package's environment from C code

2006-10-22 Thread Seth Falcon
"Deepayan Sarkar" <[EMAIL PROTECTED]> writes: > On 10/22/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> In R code, you could use getNamespace("pkg") to get the namespace >> environment. I haven't tried this, but I'd assume >> >> PROTECT(rho = eval(lang2(install("getNamespace"), >>

Re: [Rd] Getting hold of a package's environment from C code

2006-10-22 Thread Seth Falcon
Seth Falcon <[EMAIL PROTECTED]> writes: > Perhaps: > > R_FindNamespace(mkString(where)) Sorry, this won't help you for package-level code as this function is part of the internal use only API. It would be nice to have access to it or a similar function fr

[Rd] NA handling in as.character applied to a list

2006-10-25 Thread Seth Falcon
LSE Thoughts? + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] NA handling in as.character applied to a list

2006-10-26 Thread Seth Falcon
Peter Dalgaard <[EMAIL PROTECTED]> writes: > Hmm... > >> as.character(v) > [1] NA "NA" "NA" > > This does look like a leftover from times when there was no character > NA in the language. It is the kind of thing you need to be very > careful about fixing though. (I have a couple of scars from > a

Re: [Rd] Pb with .findInheritedMethods

2006-10-28 Thread Seth Falcon
John Chambers <[EMAIL PROTECTED]> writes: > As I mentioned, this relates to writing methods for initialize(). > Imagine someone else extends the class "Ab", for which you wrote a > method. If they add slots to their class and you do not pass down ... > to callNextMethod(), then you have blocked us

Re: [Rd] install packages RMySQL fail

2006-10-29 Thread Seth Falcon
Juan Santiago Ramseyer <[EMAIL PROTECTED]> writes: > install packages RMySQL fail. > > System Fedora Core 6 x86_64 > > see down. It's bug or incomplete install MySQL? You need to install the devel headers for MySQL. This should be available as an rpm for your system. + seth ___

Re: [Rd] WG: Formal methods are not loaded from NAMESPACE inreloadedworkspace image

2006-11-03 Thread Seth Falcon
"Pfaff, Bernhard Dr." <[EMAIL PROTECTED]> writes: > Sorry, to bother the list one more time: but the following worked at > least for 'urca': > > in NAMESPACE I now included explicitly: > > import(methods) > > a fix of the 'urca'-package will be uploaded to CRAN on the weekend. > Fritz, will this w

Re: [Rd] Formal methods are not loaded from NAMESPACE in reloadedworkspace image

2006-11-03 Thread Seth Falcon
John Chambers <[EMAIL PROTECTED]> writes: > I haven't had a chance to verify these exact examples, but the likely > explanation is that loading the workspace does not cache the saved > methods. Assuming this is indeed what's happening, the workaround is to > cache them "manually" by the call:

[Rd] Getting the name of a SEXP type in package code?

2006-11-07 Thread Seth Falcon
Hi, Is there an alternative to type2char that is available for use in package code? It would be useful for producing more informative error messages. + seth __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Getting the name of a SEXP type in package code?

2006-11-08 Thread Seth Falcon
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > type2char is itself a fairly recent addition (there is also type2str, > which is older) that I found useful for improving messages in R > itself. > > I have not encountered such a need in package code, but the function > is exported. > > This is not

[Rd] Problem with X11 configure checking in R-devel?

2006-11-14 Thread Seth Falcon
Hi, I just updated to svn rev 39899 on a SuSE 10.1/x86_64 system and I get the following error when configuring R: checking for X... libraries /usr/X11R6/lib64, headers /usr/X11R6/include checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat..

[Rd] Feature request: put NewEnvironment and R_NewhashedEnv into API

2006-11-14 Thread Seth Falcon
Hi, I would like to be able to create new environments from package C code. AFAICT, this isn't allowed since both NewEnvironment and R_NewHashedEnv are declared in Defn.R. If exposing this isn't controvertial, I would submit a patch. However, I'm not sure where the declarations should go (Rdefin

Re: [Rd] Feature request: put NewEnvironment and R_NewhashedEnv into API

2006-11-15 Thread Seth Falcon
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > NewEnvironment is currently exposed as Rf_NewEnvironment. > R_NewHashedEnv is currrently hidden, but I'll unhide it. It does not > need a further prefix. Thank you. Could someone provide a bit more detail on how to determine if a given function in

Re: [Rd] Data table in C

2006-11-17 Thread Seth Falcon
"Tom McCallum" <[EMAIL PROTECTED]> writes: > After getting one list done, I am now struggling to form a data frame in C. > > I tried to do a list of lists which gives me : > > $ > $[[1]] > [1] "BID" > > $[[2]] > [1] 0.6718 [snip] > > and then as.data.frame them in R but this gives me One approach

Re: [Rd] Function lang2 in C

2006-11-21 Thread Seth Falcon
"Ricardo Rios" <[EMAIL PROTECTED]> writes: > I have a source code in C, it use the function lang2 ,does somebody > know what does this function do. Thanks in advance. It creates a language list. This is a Lisp-style pair list. A common use of it is to build a function call to pass to eval. + s

Re: [Rd] Source references from the parser

2006-11-27 Thread Seth Falcon
Hi Duncan, all, Duncan Murdoch <[EMAIL PROTECTED]> writes: > This is now committed. > > I used keep.source, exactly the same as the option() that controls this > behaviour in other places. > > I decided to set the default to TRUE. This means vignettes will all > look different in R-devel. I'

Re: [Rd] Source references from the parser

2006-11-29 Thread Seth Falcon
Duncan Murdoch <[EMAIL PROTECTED]> writes: > There have been a couple of requests to set the keep.source default to > FALSE (i.e. not to enable the new behaviour), so I've done that. Thank you. That is much appreciated. > Hopefully the code will still be exercised enough that we can have > conf

Re: [Rd] promptClass misses methods

2006-12-02 Thread Seth Falcon
Ross Boylan <[EMAIL PROTECTED]> writes: > That answers my question. The meaning was if "foo" is an S3 method, > should one avoid defining "foo" as an S4 method. And the answer is > no, it's OK. I assume one should strive to use the same argument > names, although since S3 methods don't need to u

Re: [Rd] Wondering about methods (selecting a less specialized method)

2006-12-11 Thread Seth Falcon
"Byron Ellis" <[EMAIL PROTECTED]> writes: > Hi All, > > I find myself wondering if there is a canonical means of achieving the > multiple-dispatch version of 'super'? Specifically, I have a set of > classes > > A, B, X and Y where B extends A > > and a method Foo with the signature (X,A,Y) and I'd

Re: [Rd] Conditional suggest

2006-12-12 Thread Seth Falcon
Kurt wrote: >> This is not "enhancing" the way it is currently implemented, which is >> allowing for the possibility to provide S3 or S4 methods for classes >> from another package without actively suggesting it (thus enhancing >> it). By provide an S4 method for a class, I guess you mean define

Re: [Rd] caching frequently used values

2006-12-13 Thread Seth Falcon
Tamas K Papp <[EMAIL PROTECTED]> writes: > On Wed, Dec 13, 2006 at 03:05:46PM -0800, Robert Gentleman wrote: > >> e1 = new.env(hash=TRUE) >> >> e1[["1"]] = whateveryouwant >> >> ie. just transform to characters, but I don't see why you want to do >> that - surely there are more informative name

[Rd] A possible improvement to apropos

2006-12-13 Thread Seth Falcon
Hello all, I've had the following apropos alternative in my ~/.Rprofile for some time, and have found it more useful than the current version. Basically, my version ignores case when searching. If others find this useful, perhaps apropos could be suitably patched (and I'd be willing to create suc

Re: [Rd] A possible improvement to apropos

2006-12-14 Thread Seth Falcon
Martin Maechler <[EMAIL PROTECTED]> writes: > Hi Seth, > Could you live with typing 'i=T' (i.e. ignore.case=TRUE)? I can live with my ~/.Rprofile, I suppose. :-) > In principle, I'd like to keep the default as ignore.case=FALSE, > since we'd really should teach the users that R > *is* case s

Re: [Rd] A possible improvement to apropos

2006-12-15 Thread Seth Falcon
Kurt Hornik <[EMAIL PROTECTED]> writes: >> Robert Gentleman writes: > >> I would also, personally prefer some sort of approximate matching since >> there are different ways to spell some words, and some folks abbreviate >> parts of words. > > The same design has been employed by help.search

Re: [Rd] question about trailing arguments in an S4 method

2006-12-16 Thread Seth Falcon
Ben Bolker <[EMAIL PROTECTED]> writes: > I'm trying to add arguments to the AIC method > for some classes -- things like > weights=TRUE to calculate AIC weights > corr=TRUE, nobs to calculate AICc > delta=TRUE to put a delta-AIC column in the output. > > The problem is that AIC is define

Re: [Rd] Capturing argument values

2007-01-03 Thread Seth Falcon
Ross Boylan <[EMAIL PROTECTED]> writes: > I would like to preserve the values of all the arguments to a function > in a results object. > foo <- function(a, b=1) > foo(x, 3) > > match.call() looks promising, but it records that a is x, while I want > the value of x (in the calling frame). Al

Re: [Rd] Parameter changes and segfault when calling C code through .Call

2007-01-04 Thread Seth Falcon
"Michael Braun" <[EMAIL PROTECTED]> writes: > Suppose I want to compute the log density of a multivariate normal > distribution using C code and the gsl library. My R program is: > > dyn.load("mvnorm-logpdf.so") > > x<-c(0,0,0,0,0,0) > mu<-c(0,0,0,0,0,0) > sig<-diag(6) >

[Rd] can't compile on OSX: unsetenv header issues

2007-01-08 Thread Seth Falcon
Hi, A recent change has R failing to compile (for me) on ppc OSX 10.4.8 like this: ../../../../R-devel/src/main/datetime.c: In function `reset_tz': ../../../../R-devel/src/main/datetime.c:511: error: void value not ignored as it ought to be I suspect there is some sort of configure magic that n

[Rd] undocumented name mangling during unlist?

2007-01-08 Thread Seth Falcon
The documentation for unlist says: By default, 'unlist' tries to retain the naming information present in 'x'. If 'use.names = FALSE' all naming information is dropped. Hence, I find it odd that I see the following: > b <- list("highway1"=1:5) > unlist(b) highway11 hi

Re: [Rd] undocumented name mangling during unlist?

2007-01-09 Thread Seth Falcon
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > On Mon, 8 Jan 2007, Seth Falcon wrote: > >> The documentation for unlist says: >> >> By default, 'unlist' tries to retain the naming information >> present in 'x'. If 'use.names =

<    1   2   3   4