Re: [Rd] Error in loadNamespace(name) (PR#9464)

2007-01-26 Thread r . darnell
Thank you for your reply. There is some more information that may help your reproduce the error. The .RData file was generated under MSWindows. I started with an empty workspace and generated an object by y <- runif(200) or very similar. the quit, saving the workspace. (NTFS partition) I t

Re: [Rd] "[" operator and indexing ambiguity

2007-01-26 Thread Tony Plate
You can find this info using the function nargs(). I've used this with S3 classes, and as far as I know it should work with S4 classes too. See ?nargs for examples. -- Tony Plate Bradley Buchsbaum wrote: > Hi, > > I am working on writing some S4 classes that represent > multidimensional (brai

[Rd] FW: reducing RODBC odbcQuery memory use?

2007-01-26 Thread WILLIE, JILL
New to R, sorry if one or either of these is an inappropriate list for a question like this below; please let me know if this is a general help question. Jill Willie Open Seas Safeco Insurance [EMAIL PROTECTED] -Original Message- From: WILLIE, JILL Sent: Thursday, January 25, 2007 2:27

Re: [Rd] "[" operator and indexing ambiguity

2007-01-26 Thread Martin Morgan
Hackish (and maybe expensive; does match.call duplicate the call arguments?), but maybe setClass("A", "numeric") setMethod("[", c(x="A"), function(x, i, j, ..., drop=TRUE) { "..." %in% names(match.call(expand.dots=FALSE)) }) > a <- new("A") > a[i] [1]

Re: [Rd] i may have missed something ..

2007-01-26 Thread Jan de Leeuw
Switching the icc compiler flag from -O3 to -O0 for deriv.c solves the problem. As I said, I have to do that for regex.c as well. -- Jan On Jan 26, 2007, at 07:52 , Prof Brian Ripley wrote: > Ouch. It does look like a compiler over-optimization sort of problem. > > I presume that is the ix86 ic

Re: [Rd] i may have missed something ..

2007-01-26 Thread Jan de Leeuw
Yes. No such problem with the pair gcc/ifort. I'll try less aggressive optimization with icc on deriv.c (I also have to do that for regex.c). -- Jan On Jan 26, 2007, at 07:52 , Prof Brian Ripley wrote: > Ouch. It does look like a compiler over-optimization sort of problem. > > I presume that is

[Rd] "[" operator and indexing ambiguity

2007-01-26 Thread Bradley Buchsbaum
Hi, I am working on writing some S4 classes that represent multidimensional (brain) image data. I would like these classes to support standard array indexing. I have been studying the Matrix and EBImage (http://www.bioconductor.org/packages/1.9/bioc/html/EBImage.html) packages to see how this is

Re: [Rd] i may have missed something ..

2007-01-26 Thread Prof Brian Ripley
Ouch. It does look like a compiler over-optimization sort of problem. I presume that is the ix86 icc, with which we have not had much success on either Linux or Windows. I've just checked x86_64 icc on Linux, and that is working correctly. Brian On Fri, 26 Jan 2007, Jan de Leeuw wrote: > Thi

Re: [Rd] i may have missed something ..

2007-01-26 Thread Jan de Leeuw
This is R revision 40576 compiled with icc/ifort on OS X 10.4.9 (8P2122). It may be the compiler. -- J. > example(deriv) deriv> ## formula argument : deriv> dx2x <- deriv(~ x^2, "x") ; dx2x expression({ .value <- x^2 .grad <- array(0, c(length(.value), 1), list(NULL, c("x"))) .gr

Re: [Rd] Rscript on Windows

2007-01-26 Thread Gabor Grothendieck
Good idea. ruby seems to work the same way. python does too but with a slightly different definition: C:\> ruby -h | findstr strip -x[directory] strip off text before #!ruby line and perhaps cd to directory C:\> perl -h | findstr strip -x[directory] strip off text before #!perl line and

Re: [Rd] Rscript on Windows

2007-01-26 Thread Vladimir Eremeev
ActivePerl has '-x' switch which tells it to skip all lines in the file till "#!". This allows writing perl scripts in ordinary .bat files. ?shQuote contains a link with the following perl script example: ===8<=== @echo off :: hello.bat :: Windows executable Perl script :: Note: :: assumes perl

Re: [Rd] how to properly extend s3 data.frames with s4 classes?

2007-01-26 Thread Tim Bergsma
Dear Ulf Martin, Thank you for your thoughtful analysis regarding the use of S3 data frames in S4. I asked the same question (in a more rudimentary manner) on the r-help list on 30 Nov 2006 and 04 Dec 2006. There were no replies. If you find a solution, please post. Best Regards, Tim Bergs

Re: [Rd] Using Windows API functions in R

2007-01-26 Thread ровен Акьатои
Thanks Professor, will try to create a wrapper needed to call WIN API functions. > > You cannot make use of WINAPI calls from .C (or otherwise in R): it is set > up for _cdecl calls only. > > You will need to write some wrapper C code. > > >> And now i'm at loss how to represent the data struc

[Rd] readBin is much slower for raw input than for a file

2007-01-26 Thread Jon Clayden
Dear all, I'm trying to write an efficient binary file reader for a file type that is made up of several fields of variable length, and so requires many small reads. Doing this on the file directly using a sequence of readBin() calls is a bit too slow for my needs, so I tried buffering the file in

[Rd] double integral with C code

2007-01-26 Thread Stefano Mazzuco
Hi all, This is more a C querie rather than a R one: I'm writing a C code passing a function F to adapt fortran subroutine. I need to integrate over two variables of F, call them x1 and x2. Then I call the C code in R to optimize the integrated F function. for example F could be defined as

Re: [Rd] Using Windows API functions in R

2007-01-26 Thread Prof Brian Ripley
On Fri, 26 Jan 2007, ? ??? wrote: > Somehow autofilter doesn't allow this message to be posted, > will try another time. > > -Original Message- > From: Yuri Volchik <[EMAIL PROTECTED]> > To: r-devel@r-project.org > Date: Thu, 25 Jan 2007 22:27:13 + > Subject: Using Windows API

[Rd] Using Windows API functions in R

2007-01-26 Thread ровен Акьатои
Somehow autofilter doesn't allow this message to be posted, will try another time. -Original Message- From: Yuri Volchik <[EMAIL PROTECTED]> To: r-devel@r-project.org Date: Thu, 25 Jan 2007 22:27:13 + Subject: Using Windows API functions in R > > Hi to all. > > In programming one a

Re: [Rd] i may have missed something ..

2007-01-26 Thread Prof Brian Ripley
On Thu, 25 Jan 2007, Jan de Leeuw wrote: > but deriv() and friends do not work in R-devel (at least > not on the Mac). They work for me under Linux and Windows. What does example(deriv) give you? > == > Jan de Leeuw, 11667 Steinhoff Rd, F

[Rd] i may have missed something ..

2007-01-26 Thread Jan de Leeuw
but deriv() and friends do not work in R-devel (at least not on the Mac). == Jan de Leeuw, 11667 Steinhoff Rd, Frazier Park, CA 93225 home 661-245-1725 skype 661-347-0667 global 254-381-4905 .mac: jdeleeuw +++ aim: deleeuwjan +++ skype: j_de

Re: [Rd] ?mean

2007-01-26 Thread Berwin A Turlach
G'day Gabor, On Thu, 25 Jan 2007 09:53:49 -0500 "Gabor Grothendieck" <[EMAIL PROTECTED]> wrote: > The help page for mean does not say what happens when one > applies mean to a matrix. Well, not directly. :-) But the help page of mean says that one of the arguments is: x: An R object.

Re: [Rd] Inferring dimensions on bitmap device from par()

2007-01-26 Thread Henrik Bengtsson
On 1/25/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > You asked > > > (or ultimately the dimension of the generated plot in pixels) without > > know which of png(), jpeg() or bitmap() was used? > > That is determined by arguments 'width' and 'height' in the call to the > device, and for the fi