[Rd] Questions about name space directives

2007-05-01 Thread Seth Falcon
, an exportMethods(foo) directive does not re-export the foo generic. I find it confusing that exportMethods sometimes exports the generic and sometimes not. The generic can be re-exported using export(). + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer

Re: [Rd] Embedding R and registering routines

2007-05-01 Thread Seth Falcon
available, I don't see why an R package should not be able to provide an analogous plugin mechanism of its own. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing

[Rd] Possible problem with S4 dispatch

2007-04-30 Thread Seth Falcon
to be that the mget generic is not found -- but I find it confusing that selectMethod works here. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing list https://stat.ethz.ch

Re: [Rd] system() in packages

2007-04-27 Thread Seth Falcon
whether it errored out or not and set action based on that. + 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] R-2.5.0 install

2007-04-27 Thread Seth Falcon
. BioC packages are developed for a particular R release and in general I would not expect BioC packages developed older R's to work with current R's. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org

Re: [Rd] R-2.5.0 install

2007-04-27 Thread Seth Falcon
Update: Seth Falcon [EMAIL PROTECTED] writes: And for me it does. Almost. With a clean package library, I end up with an error installing matchprobes because library.dynam can't find a shared library called matchprobes_1.8.0. Since other packages that have native code are installing

Re: [Rd] R-2.5.0 install

2007-04-27 Thread Seth Falcon
this for the release and devel versions of matchprobes. (That's not an uncommon mistake, BTW: EBarrays, puma and twilight of BioC seem to share it.) Indeed. I will contact the maintainers of those packages. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http

[Rd] Problem with R-2.5.0 patched and Matrix package

2007-04-26 Thread Seth Falcon
. And I'm guessing that Matrix works with the release, but haven't had time to check this. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing list https

Re: [Rd] Sort output of apropos

2007-04-15 Thread Seth Falcon
Prof Brian Ripley [EMAIL PROTECTED] writes: Seems sensible, but 2.5.0 is in feature freeze and it is possible that someone has relied on this. I've added this (and a \value section to the help file) for R-devel. Excellent. Thank you. + seth -- Seth Falcon | Computational Biology | Fred

Re: [Rd] how to control which version of a package library() installs?

2007-04-13 Thread Seth Falcon
methods if TRUE. It will fail if the name space is in use by another package. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman

[Rd] list/matrix chimera

2007-04-10 Thread Seth Falcon
class(vv) [1] matrix typeof(vv) [1] list vv[1, 1] [[1]] [1] 1 vv[1, ] [[1]] [1] 1 [[2]] [1] 7 [[3]] [1] 13 [[4]] [1] 19 + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research

Re: [Rd] list/matrix chimera

2007-04-10 Thread Seth Falcon
of a vector of S4 objects. There you could ensure they are all the same type. + 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

Re: [Rd] list/matrix chimera

2007-04-10 Thread Seth Falcon
hadley wickham [EMAIL PROTECTED] writes: That's rather a contrived example. In practice, you would create a list containing the same type of objects. eg: Yes, great. But when you have code that is expecting a matrix argument, you can't know what you are going to get. I suspect there is a

Re: [Rd] Suggestion for memory optimization and as.double() with friends

2007-03-29 Thread Seth Falcon
as.integer eval eval storage.mode- tracemem[0x1fa6808 - 0x2c26b18]: as.integer.default as.integer eval eval storage.mode- tracemem[0x2c26b18 - 0x2c26a88]: storage.mode- + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org

Re: [Rd] how to use debug.mypkg

2007-03-22 Thread Seth Falcon
that checks if(OPTIONS$debug) and does something different. + 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] R 2.5.0 devel try issue in conjuntion with S4 method dispatch

2007-03-17 Thread Seth Falcon
Peter Dalgaard [EMAIL PROTECTED] writes: I have just committed my variation of Seth's patch, so please check the current r-devel too. Thanks, Peter. And I agree that your variation is cleaner. -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http

Re: [Rd] R 2.5.0 devel try issue in conjuntion with S4 method dispatch

2007-03-16 Thread Seth Falcon
]: x2 - frob2(5L) tracemem(x2) [1] 0x3de8140 x2[1L] - 5L Best Wishes, + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing list https

Re: [Rd] Inherited S4 methods

2007-03-16 Thread Seth Falcon
++ methods. If this is possible, does there exist an example? The S4 object system is generic function based. Methods are not contained inside classes. You can define a generic 'myfunction' and then define methods for BaseClass and DerivedClass. + seth -- Seth Falcon | Computational Biology | Fred

Re: [Rd] fortune() in .Rprofile conflicts with R CMD INSTALL

2007-03-04 Thread Seth Falcon
, seems like it should be possible. + 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] Problem using callNextMethod() in S4

2007-03-04 Thread Seth Falcon
in. It is an odd thing to do in a validity method. + 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] S3 best practice

2007-03-02 Thread Seth Falcon
Robin Hankin [EMAIL PROTECTED] writes: Hello everyone Suppose I have an S3 class dog and a function plot.dog() which looks like this: plot.dog - function(x,show.uncertainty, ...){ do a simple plot if (show.uncertainty){ perform complicated combinatorial stuff that takes 20

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Seth Falcon
Herve Pages [EMAIL PROTECTED] writes: So apparently here extracting with dat[i, ] is 300 times faster than extracting with dat[key, ] ! system.time(for (i in 1:100) dat[1, ]) user system elapsed 12.680 0.396 13.075 system.time(for (i in 1:100) dat[1, ]) user system elapsed

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-04 Thread Seth Falcon
cstrato [EMAIL PROTECTED] writes: Thank you for your fast answer. Sorrowly, I don´t know how to use a debugger on MacOS X, I am using old-style print commands. You should be able to use gdb on OS X (works for me, YMMV). So you could try: R -d gdb run # source a script that

Re: [Rd] Problems with definitions of S4-generics

2007-02-01 Thread Seth Falcon
Jörg Beyer [EMAIL PROTECTED] writes: Hello all, I'd like to report a problem related to S4 classes. Platform: Mac G4/400 PCI (PPC-architecture) Mac OS 10.4.8 R 2.4.1 for Mac OS X (CRAN binary, 2006-12-19) w/ R.app 1.18 I see the same thing using a fairly recent R-devel:

Re: [Rd] S4 initialize or generating function

2007-01-31 Thread Seth Falcon
Thomas Petzoldt [EMAIL PROTECTED] writes: Hello, apologies if I missed something well known. I'm just revising an own package and wonder if it is still common to use generating functions which have the same name as the corresponding S4 class as suggested by Chambers, 2001. Classes and

Re: [Rd] S4 initialize or generating function

2007-01-31 Thread Seth Falcon
Thomas Petzoldt [EMAIL PROTECTED] writes: One odd thing I found was that initialize does obviously not allow to incorporate additional named parameters which are not slots. ?! Does for me: setClass(FOO, representation(x=numeric)) [1] FOO setMethod(initialize, FOO,

Re: [Rd] rep missing from methods:::.BasicFunsList

2007-01-31 Thread Seth Falcon
Stephen Pope [EMAIL PROTECTED] writes: With: R version 2.4.1 Patched (2007-01-22 r40548) rep is missing from methods:::.BasicFunsList, causing methods:::genericForPrimitive(rep) to fail, which in turn causes setMethod(rep, ...) to fail. (setGeneric(rep) of course fails as it should,

Re: [Rd] S4 initialize or generating function

2007-01-31 Thread Seth Falcon
Thomas Petzoldt [EMAIL PROTECTED] writes: Your example works but one can not arbitrarily mix slots, other named arguments and the default callNextMethod(). The documentation states: ... Data to include in the new object. Named arguments correspond to slots in the class definition. And this

Re: [Rd] [ operator and indexing ambiguity

2007-01-30 Thread Seth Falcon
Oleg Sklyar [EMAIL PROTECTED] writes: As Tony correctly writes one can generally use nargs() to get the number of arguments, and this works for [(x,i,j,...,drop) method as well. The problem I had with the EBImage where I could not distinguish between x[index] and x[index,,] is that somehow

[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

[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

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) print(sig)

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). Also, if

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 defined as

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

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 names to be used -

[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

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 a method

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 like to

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 use the

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

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'd really

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. + seth

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 : $NA $NA[[1]] [1] BID $NA[[2]] [1] 0.6718 [snip] and then as.data.frame them in R but this gives me One approach is to

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 R's

[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

[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

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 a request

[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] 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 work for ypur

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:

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] 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 users

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 as.character on

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 from C in package code

Re: [Rd] Caching bug with showMethods?

2006-10-18 Thread Seth Falcon
. 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 know about if at all possible). Best, + seth -- Seth Falcon | Computational

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 their

[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

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). And if

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 the

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...? Oups. The example I was looking at has

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

2006-10-17 Thread Seth Falcon
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 https://stat.ethz.ch/mailman/listinfo/r

[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] getMethods() not finding all methods

2006-10-12 Thread Seth Falcon
Steven McKinney [EMAIL PROTECTED] writes: Running R2.4.0 on Apple Mac OS X 10.4.8, in Emacs ESS mode, and also R.app. In an attempt to learn a bit more about a particular method (geneNames in package affy) I invoked getMethods(geneNames) which produced geneNames methods, but not the

Re: [Rd] operator :: and symbols not in the namespace of a package with a namespace

2006-10-11 Thread Seth Falcon
functions will see the corrected version and some the original if they just use fix(). Explaining this concept to students could be difficult, but don't they need to understand this namespace concept when they modify functions? + seth -- Seth Falcon | Computational Biology | Fred Hutchinson

[Rd] Possible bug in accessing methods documentation?

2006-10-11 Thread Seth Falcon
Hi, Reading help(Documentation), I'm led to believe that a help call like: ?myFun(x, sqrt(wt)) Will search for help on the appropriate method in the case that myFun is generic. This isn't working for me. Here is an example using the Biobase package: ## If Biobase is not installed

Re: [Rd] Last R-devel snapshot is an empty tarball

2006-10-05 Thread Seth Falcon
Peter Dalgaard [EMAIL PROTECTED] writes: Herve Pages [EMAIL PROTECTED] writes: Dear list, The last R-devel snapshot (2006-10-03) is an empty tarball: ftp://ftp.stat.math.ethz.ch/Software/R/ We know... make dist was broken for a while. The unstable development version will occasionally

Re: [Rd] Strange behaviour of the [[ operator

2006-09-30 Thread Seth Falcon
Martin Maechler [EMAIL PROTECTED] writes: a - list(b=5) a[['b']] Herve [1] 5 a[[t-'b']] Herve Nothing gets printed! Yes, but that is not really much related to [[ but rather to - which momentarily turns off auto-printing. Yes, not being related to [[ is exactly

Re: [Rd] R CMD build when the package name is different from the directory name

2006-09-28 Thread Seth Falcon
Arne Henningsen [EMAIL PROTECTED] writes: Hi, I was really happy when I saw that in R version 2.3.0 R CMD check works for packages whose package name is different from the directory name in which it is located (see http://cran.r-project.org/src/base/NEWS). Now, I can have branches of my

Re: [Rd] S4 accessors

2006-09-27 Thread Seth Falcon
John Chambers [EMAIL PROTECTED] writes: There is a point that needs to be remembered in discussions of accessor functions (and more generally). We're working with a class/method mechanism in a _functional_ language. Simple analogies made from class-based languages such as Java are not

Re: [Rd] eval(SEXP fn,SEXP rho) in C++ code

2006-09-27 Thread Seth Falcon
Patricia Bautista [EMAIL PROTECTED] writes: Hi r-devel, I am working on a R extension. I am writing the function in C++, and in my function it is required a R function object from the user. This R function object will be evaluated thousand of times in my C++ code. I generated the shared

Re: [Rd] S4 accessors

2006-09-26 Thread Seth Falcon
difficult and IMO this is in part a consequence of the more general (read more powerful) generic function based system. IOW, I think these are good questions. They are ones that I struggle with and do not know of any truly satisfying answers. Best, + seth -- Seth Falcon | Computational Biology

Re: [Rd] S4 accessors

2006-09-25 Thread Seth Falcon
for their final argument, but the value has different meanings and types in different contexts. Any suggestions or comments? For accessors, I like to document them in the methods section of the class documentation. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research

[Rd] Problem with tcltk package: tclfile.dir missing?

2006-09-24 Thread Seth Falcon
Hi, In R version 2.4.0 beta (2006-09-24 r39502) I'm seeing the following behavior with the tcltk package: library(tcltk) Loading Tcl/Tk interface ... done tkfile.dir() Error: 'tkfile.dir' is defunct. Use 'tclfile.dir' instead. See help(Defunct) tclfile.dir Error: object tclfile.dir not

Re: [Rd] Sweave processes \Sexpr in commented LaTeX source

2006-09-21 Thread Seth Falcon
[shameless plug] Jean lobry [EMAIL PROTECTED] writes: TimeConsumingCodeChunk1,eval=F= x - rnorm(100) ... @ I have \Sexpr{ifelse(exists(x), length(x), Ooops, I forgot to evaluate TimeConsumingCodeChunk1)} elements in vector x. For the case of TimeConsumingCodeChunks, another solution is

Re: [Rd] Package dependencies and imports

2006-09-21 Thread Seth Falcon
Martin Maechler [EMAIL PROTECTED] writes: I think you should use the new DESCRIPTION field and say 'Enhances: rgl' but I haven't checked if this prevents the warning, though I think it should.. But is Rcmdr enhancing rgl or being enhanced by rgl? :-( :-(

[Rd] Possible bug in base::namespaceImportFrom?

2006-09-21 Thread Seth Falcon
Hi, namespaceImportFrom in base/R/namespace.R has the following: fdef - methods:::getGeneric(genName, impenv) The definition of getGeneric is in methods/R/RMethodUtils.R starts with: getGeneric - ## return the definition of the function named f as a generic. ## ##

Re: [Rd] Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)

2006-09-20 Thread Seth Falcon
Peter Dalgaard [EMAIL PROTECTED] writes: ..not to mention TeX comments inside Sexpr (e.g. %*%...). Skipping lines with % as the first character might be a viable compromise though. +1. You could probably ignore any lines where the first non-whitespace char is '%'. But if that seems to

Re: [Rd] Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)

2006-09-20 Thread Seth Falcon
Antonio, Fabio Di Narzo [EMAIL PROTECTED] writes: 2006/9/20, Seth Falcon [EMAIL PROTECTED]: Peter Dalgaard [EMAIL PROTECTED] writes: ..not to mention TeX comments inside Sexpr (e.g. %*%...). Skipping lines with % as the first character might be a viable compromise though. +1. You could

[Rd] Question about substitute() and function def

2006-09-14 Thread Seth Falcon
Hi, Can someone help me understand why substitute(function(a) a + 1, list(a=quote(foo))) gives function(a) foo + 1 and not function(foo) foo + 1 The man page leads me to believe this is related to lazy evaluation of function arguments, but I'm not getting the big picture. Thanks, +

Re: [Rd] problems in installing packages with R version 2.4.0 alpha (2006-09-05 r39134)

2006-09-12 Thread Seth Falcon
Uwe Ligges [EMAIL PROTECTED] writes: Currently, the main problems with many packages are missing *recent* binaries (after the latest S4 changes) of BioC packages, hence many dependencies may not be working. I do not want to compile the whole BioC repository as well. The Bioconductor build

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-04 Thread Seth Falcon
Sean Davis [EMAIL PROTECTED] writes: Seth Falcon wrote: Peter Dalgaard [EMAIL PROTECTED] writes: Henrik Bengtsson [EMAIL PROTECTED] writes: This has been reported before on r-devel, e.g. May 9, 2006 [Rd] Seg fault when installing package from bad repository. It's happening

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-04 Thread Seth Falcon
Henrik Bengtsson [EMAIL PROTECTED] writes: Yes, there's been some problems with the Bioconductor server the last few days, e.g. http://bioconductor.org/biocLite.R is not working either. It was down on Monday night too and then it was not possible to install any packages from them. I think

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-03 Thread Seth Falcon
crash workaround from Seth Falcon Sean: can you try just download.file with a URL that gives 404? Are you running an R version prior to the above commit? Bw, + seth __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] 'CanMakeUseOf' field

2006-08-31 Thread Seth Falcon
Martin Maechler [EMAIL PROTECTED] writes: Seth == Seth Falcon [EMAIL PROTECTED] on Wed, 30 Aug 2006 07:06:24 -0700 writes: Seth Kurt Hornik [EMAIL PROTECTED] writes: An internal environment variable called _R_CHECK_FORCE_SUGGESTS_ which controls

Re: [Rd] 'CanMakeUseOf' field

2006-08-30 Thread Seth Falcon
Kurt Hornik [EMAIL PROTECTED] writes: An internal environment variable called _R_CHECK_FORCE_SUGGESTS_ which controls this has been in place for quite some time now. One can trivially add a Perl R CMD check configure variable for it. I am a bit hesitant to add a --force-suggests cola to

Re: [Rd] Enhances

2006-08-30 Thread Seth Falcon
Dirk Eddelbuettel [EMAIL PROTECTED] writes: Now, while we're at it, Debian also has a field called Enhances: and IIRC it provides a means to communicate a relationship 'the other way'. Ie a package foo, rather than being 'pulled in' by a package bar via a Depends, makes itself available to

[Rd] Duplicated definition of helper in available.packages

2006-08-30 Thread Seth Falcon
Hi, The .checkRversion helper function is defined twice in available.packages. I'm pretty sure one definition will suffice. Untested patch below. + seth diff --git a/src/library/utils/R/packages.R b/src/library/utils/R/packages.R index 0b84f02..5184992 100644 ---

Re: [Rd] S4 Methods dispatch

2006-08-30 Thread Seth Falcon
Henrik Bengtsson [EMAIL PROTECTED] writes: I think it's more complicated than this. First of all, is it mandatory for a package to be explicit about 'methods'? Second, there are many packages that imports 'methods' implicitly via dependency of other S4 packages, .e.g see many Bioconductor

Re: [Rd] PATCH: Add fields argument to installed.packages and available.packages

2006-08-29 Thread Seth Falcon
Martin Maechler [EMAIL PROTECTED] writes: I like the idea and will look into applying the patch (note there's at least one typo which makes make check fail: /priotiry/) Great. Sorry for the typo, I've sent an update privately. A propos: A while back (in last summer?), we (some of R-core)

Re: [Rd] 'CanMakeUseOf' field

2006-08-29 Thread Seth Falcon
Duncan Murdoch [EMAIL PROTECTED] writes: I think we need an option to R CMD check rather than a new field in the DESCRIPTION. Currently a package could be mentioned for any of these reasons: 1. To make functions, examples or vignettes work 2. To allow optional functionality in

Re: [Rd] 'CanMakeUseOf' field

2006-08-29 Thread Seth Falcon
Duncan Murdoch [EMAIL PROTECTED] writes: On 8/29/2006 11:58 AM, Seth Falcon wrote: I think there is an important distinction between a dependency needed for the package to function and a dependency needed to demonstrate said functionality via an example or vignette. The former is what

[Rd] PATCH: Add fields argument to installed.packages and available.packages

2006-08-28 Thread Seth Falcon
Hi all, The write_PACKAGES function has a 'fields' argument that allows a user generating a PACKAGES file to specify additional fields to include. For symmetry, it would be nice for the available.packages function to be able to read those extra fields when specified. Similarly, it would be

Re: [Rd] S4 'object is not subsettable' in prototype

2006-08-21 Thread Seth Falcon
John Chambers [EMAIL PROTECTED] writes: When I was introducing the special type for S4 objects, my first inclination was to have length(x) for those objects be either NA or an error, along the lines that intuitively length(x) means the number of elements in the vector-style object x.

Re: [Rd] Pb with contrib.url() (PR#9131)

2006-08-18 Thread Seth Falcon
Simon Urbanek [EMAIL PROTECTED] writes: Yes, I see, thanks. Given that we supply universal binaries (=should work on all supported archs), we could define mac.binary as macosx/ universal and mac.binary.xxx as macosx/xxx. The default would still be mac.binary. I like this idea. I'm not

Re: [Rd] S4 'object is not subsettable' in prototype

2006-08-18 Thread Seth Falcon
Martin Maechler [EMAIL PROTECTED] writes: I agree you've found an infelicity in the current setup, since setClass(A, representation(x=numeric)) [1] A getClass(A)@prototype S4 Type Object attr(,x) numeric(0) length(getClass(A)@prototype) [1] 1

Re: [Rd] bypassing SET_DIM checking

2006-08-13 Thread Seth Falcon
miguel manese [EMAIL PROTECTED] writes: Hello, I created an S3 type w/c is actually a list that should look like a matrix but whose data is actually in an external file. The SEXP just contains info on how to retrieve the data from the file. When I get to the part of creating the SEXP, I

Re: [Rd] unique.default() drops names (PR#9130)

2006-08-10 Thread Seth Falcon
Gregor Gorjanc [EMAIL PROTECTED] writes: Thank you for the reply! I appologize for not reading the latest documentation - there was no word about droping names in 2.3.1. However, I do wonder why simple fix (as shown in previous mail) is not OK. I see value in unique() keeping names and from

Re: [Rd] StringFromInteger made private in r38652

2006-08-08 Thread Seth Falcon
Prof Brian Ripley [EMAIL PROTECTED] writes: Those functions are messy (StringFromRaw was always private), and are really just part of coerceVector and asInteger etc (which are the public interface). What RdbiPgSql does is not currently correct. It has PROTECT(rowNames =

<    1   2   3   >