Re: [Rd] parse(text=...) and the srcfile attribute

2007-07-12 Thread Deepayan Sarkar
On 7/12/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > You can do this: > > > [EMAIL PROTECTED] > [1] "\na <- 1; b <- 2**2\na + b\n" > > > # or this > > as.character(foo) > [1] "a <- 1" "b <- 2^2" "a + b" Neither of which is what I want. I want > sapply(attr(foo, "srcref"), as.character) [

Re: [Rd] parse(text=...) and the srcfile attribute

2007-07-12 Thread Gabor Grothendieck
You can do this: > [EMAIL PROTECTED] [1] "\na <- 1; b <- 2**2\na + b\n" > # or this > as.character(foo) [1] "a <- 1" "b <- 2^2" "a + b" On 7/12/07, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to understand whether the new source file references can > help me with something

[Rd] parse(text=...) and the srcfile attribute

2007-07-12 Thread Deepayan Sarkar
Hi, I'm trying to understand whether the new source file references can help me with something I want to do. Let's say I have foo <- parse(text = " a <- 1; b <- 2**2 a + b ") I now wish to recover the sources for the parsed expressions. I can get them one at a time: > foo[[2]] b <- 2^2 > as.cha

[Rd] seq_along() doesn't use _my_ length

2007-07-12 Thread Herve Pages
Hi, According to seq_along man page, 'seq_along(x)' is equivalent to 'seq_len(length(x))' but apparently not if 'x' is an S4 object with a defined "length" method: > seq_along(letters[11:15]) [1] 1 2 3 4 5 > setClass("A", representation(titi="character")) [1] "A" > setMethod("length",

Re: [Rd] Generics in base with no ...

2007-07-12 Thread Herve Pages
Duncan Murdoch wrote: > On 12/07/2007 6:17 PM, Herve Pages wrote: >> Hi, >> >> Some generics in base that don't have the ... extra argument: >> rev(), t(), scale() and unlist(). Is there any plan to make these >> more reusable? I used to be interested in having a rev() method for >> my objects, but

Re: [Rd] Generics in base with no ...

2007-07-12 Thread Duncan Murdoch
On 12/07/2007 6:17 PM, Herve Pages wrote: > Hi, > > Some generics in base that don't have the ... extra argument: > rev(), t(), scale() and unlist(). Is there any plan to make these > more reusable? I used to be interested in having a rev() method for > my objects, but since I needed an extra argu

[Rd] Generics in base with no ...

2007-07-12 Thread Herve Pages
Hi, Some generics in base that don't have the ... extra argument: rev(), t(), scale() and unlist(). Is there any plan to make these more reusable? I used to be interested in having a rev() method for my objects, but since I needed an extra argument for it, then I was forced to create my own generi

[Rd] Presentation and packaging policy

2007-07-12 Thread pingou
Dear all, I have recently subscribed to this mailing list. To briefly introduce myself, my name is Pierre-Yves, I am French, student and actually doing a master in bioinformatics. I am involved in a project on which I will have to use R and some of its libraries. To use these libraries as I am run

[Rd] (no subject)

2007-07-12 Thread Gorjanc Gregor
I have just found Sun Grid R-Project resource project site at https://r-project.dev.java.net/ Gregor __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] cleanup and Makevars

2007-07-12 Thread Hin-Tak Leung
Kasper Daniel Hansen wrote: > On Jul 11, 2007, at 9:30 AM, Prof Brian Ripley wrote: >>> The full Makevars file: >>> >>> MYCXXFLAGS=-O0 >> You do realize that is highly non-portable? > > Yes, but I do not know of any other way to downgrade the optimization > level. The SDK I am using breaks (due

Re: [Rd] cleanup and Makevars

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, Hin-Tak Leung wrote: > Kasper Daniel Hansen wrote: >> On Jul 11, 2007, at 9:30 AM, Prof Brian Ripley wrote: > The full Makevars file: MYCXXFLAGS=-O0 >>> You do realize that is highly non-portable? >> >> Yes, but I do not know of any other way to downgrade the

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, [EMAIL PROTECTED] wrote: > I would like to create a binary package for Windows which when > installed will give the user an option of whether to install > one version or another. > > Here is the problem, I have a package 'FAME' that can run > in two different modes on Windows.

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Oleg Sklyar
A configure.win file if found in the root of the package is executed during install before files from /inst are copied. What you can do is not to put your dlls in /libs but elsewhere in /inst and write a simple DOS script that will copy the required dll into /libs and rename it correspondingly.

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Duncan Murdoch
On 7/12/2007 1:00 PM, [EMAIL PROTECTED] wrote: > I would like to create a binary package for Windows which when > installed will give the user an option of whether to install > one version or another. > > Here is the problem, I have a package 'FAME' that can run > in two different modes on Windows

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Gabor Grothendieck
You could look at the Ryacas package for some ideas. zzz.R in http://ryacas.googlecode.com/svn/trunk/R/zzz.R is invoked at library(Ryacas) checking whether certain binaries are present and if not present then issues a message telling the user to run yacasInstall() without arguments. yacasIn

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Paul Gilbert
[EMAIL PROTECTED] wrote: >I would like to create a binary package for Windows which when >installed will give the user an option of whether to install >one version or another. > >Here is the problem, I have a package 'FAME' that can run >in two different modes on Windows. > I hope this is a Windo

[Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread rick.jones
I would like to create a binary package for Windows which when installed will give the user an option of whether to install one version or another. Here is the problem, I have a package 'FAME' that can run in two different modes on Windows. An old mode that uses R to connect to a remote linux mac

Re: [Rd] cleanup and Makevars

2007-07-12 Thread Prof Brian Ripley
It seems this is the BioC package affxparser. So my suggestion does work with R CMD INSTALL affxparser and using the preferred form of OBJECTS instead of OBJS also works. BDR On Thu, 12 Jul 2007, Prof Brian Ripley wrote: > You seem extraordinarily reluctant to tell us what you are actually doi

Re: [Rd] cleanup and Makevars

2007-07-12 Thread Prof Brian Ripley
You seem extraordinarily reluctant to tell us what you are actually doing: no command appears here. I presume this is a call to R CMD INSTALL, but why do I have to keep guessing? Since you have taken over the make action via the all: target in your Makevars, you need also to take over responsi

Re: [Rd] [[.data frame and row names

2007-07-12 Thread Peter Dalgaard
Prof Brian Ripley wrote: > On Wed, 11 Jul 2007, Herve Pages wrote: > > >> Hi, >> >> I'm wondering why indexing a data frame by row name doesn't work >> with [[. It works with [: >> >> > sw <- swiss[1:5,1:2] >> > sw["Moutier", "Agriculture"] >> [1] 36.5 >> >> but not with [[: >> >> > sw[["Mou

Re: [Rd] sweep sanity checking?

2007-07-12 Thread Petr Savicky
I am sorry for an incomplete proposal. The stricter check if (check.margin && any(dims[MARGIN]!=dimstat)) { was meant to be if (check.margin && (length(dimstat)!=length(MARGIN) || any(dims[MARGIN]!=dimstat))) { Petr. __ R-devel@r-project.org

Re: [Rd] sweep sanity checking?

2007-07-12 Thread Robin Hankin
Hi Brian Ripley, Heather Turner, and myself discussed this issue at some length in a thread starting 20 June 2005 (how do folk give a URL that points to a thread?). The consensus was that adding a warning level option to sweep was a good idea; Heather posted a version of sweep that implemented th

[Rd] Fextremes - Error in if (xi > 0.5) (PR#9789)

2007-07-12 Thread software
Full_Name: Ian Gregory Version: 2.41 OS: Widnows XP 64 Submission from: (NULL) (58.110.160.141) Fextremes version: 240.10068 gpdFit(c(98,99,100),threshold=100,type="pwm") Gives this error: Error in if (xi > 0.5) { : missing value where TRUE/FALSE needed This error will occur whenever a thresho

Re: [Rd] sweep sanity checking?

2007-07-12 Thread Petr Savicky
The suggestion sounds reasonable to me. Let me add that sweep is written to work even if MARGIN includes more than one dimension. To handle these cases correctly, the test may be replaced e.g. by if (check.margin && prod(dims[MARGIN])!=length(STATS)) { warning("length(STATS) != prod(dim