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

2006-08-06 Thread Gregor . Gorjanc
Hello! unique on a vector or list drops names, while it does not in case of data.frames and matrix - rownames and colnames here, but they are intuitively the same as names. The following code shows this effect: vecTest <- c("A", "D", "B", "D", "A") names(vecTest) <- paste("name", vecTest, sep=""

Re: [Rd] Can't make sort generic in quantile (S3)

2006-08-06 Thread Gabor Grothendieck
Try redefining quantile.default: environment(quantile.default) <- .GlobalEnv For example, if you run the following in a fresh session it should print out X showing that the newly defined sort was invoked: environment(quantile.default) <- .GlobalEnv sort <- function(x, ...

Re: [Rd] Customized Makefiles (C++ and R)

2006-08-06 Thread Dirk Eddelbuettel
On 6 August 2006 at 18:50, Selwyn-Lloyd McPherson wrote: | Hi everyone, | | I am writing a package for R and implementing a collection of C++ | scripts with it. Unfortunately, I did not write the C++ files, so I | am dependent on using the supplied makefile that came with it. This Not nece

[Rd] Can't make sort generic in quantile (S3)

2006-08-06 Thread miguel manese
Hello all, In my package I made sort() generic as follows: sort.default <- sort; sort <- function(x, ...) UseMethod("sort"); formals(sort.default) <- c(formals(sort.default), alist(...=)) then added a sort for my S3 class sort.sqlite.vector <- function(x, decreasing=FALSE, ...) { .Call("sdf

[Rd] Customized Makefiles (C++ and R)

2006-08-06 Thread Selwyn-Lloyd McPherson
Hi everyone, I am writing a package for R and implementing a collection of C++ scripts with it. Unfortunately, I did not write the C++ files, so I am dependent on using the supplied makefile that came with it. This works fine for compiling the program outside of R, but in trying to create

Re: [Rd] proposal for lower.tri and upper.tri value argument

2006-08-06 Thread Patrick Burns
Gabor came close to the situation I had yesterday that prompted me to write a local version of 'lower.tri'. It was approximately: x[sub, sub][lower.tri(x[sub,sub])] Pat Gabor Grothendieck wrote: > On 8/6/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > >> Is there a case to be made for this?

Re: [Rd] proposal for lower.tri and upper.tri value argument

2006-08-06 Thread Gabor Grothendieck
On 8/6/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > Is there a case to be made for this? If so, where is it? > > (I don't find x[lower.tri(x)] harder to write than lower.tri(x, > value=TRUE), and wonder why you do? The reasons are 1. x might be the result of an expression. Without value=

Re: [Rd] proposal for lower.tri and upper.tri value argument

2006-08-06 Thread Prof Brian Ripley
Is there a case to be made for this? If so, where is it? (I don't find x[lower.tri(x)] harder to write than lower.tri(x, value=TRUE), and wonder why you do? For grep, one can argue that handling empty sets is clearer with value=, but I have seen quite a few uses where that is not used and cou

Re: [Rd] R::Rdconv Rdconv() does not close input file handle (PR#9126)

2006-08-06 Thread ripley
Bill, Thanks for the report. It looks like the mail system has mangled the patches, but I have applied them manually to 2.3.1 patched and R-devel. Brian On Sat, 5 Aug 2006, [EMAIL PROTECTED] wrote: > Full_Name: Bill Dunlap > Version: 2.3.0 > OS: Windows XP > Submission from: (NULL) (71.121.18

Re: [Rd] dev.copy()

2006-08-06 Thread Uwe Ligges
VĂ­ctor Llorens Vilella wrote: > Hello, > > anybody knows dev.copy() usage? > > I'm developing a GUI for R, and at some time when I have a plot, I want to > save it as a pdf. dev.copy() is , I think, what I need as well as open a > pdf() device. Well, dev.copy(pdf, .) should do it itself. Th

Re: [Rd] residuals.glm for glm(..., y = FALSE)

2006-08-06 Thread Prof Brian Ripley
On Mon, 24 Jul 2006, Achim Zeileis wrote: > I just ran into a problem with residuals.glm() for GLMs fitted with > glm(..., y = FALSE) > For such fits, the residuals of type "deviance", "pearson" and "response" > can't be computed (see example below). The reason is that residuals.glm() > uses >