Re: [Rd] Source for bash_completion.d/R?

2011-05-02 Thread Deepayan Sarkar
On Tue, May 3, 2011 at 4:40 AM, Dirk Eddelbuettel wrote: > > On 2 May 2011 at 11:32, Sharpie wrote: > | Hello, I was just tweaking the R build for the Homebrew package manager and > I > | thought it would be nice to enable bash completion. I noticed that > | Debian-based systems install `/etc/bas

Re: [Rd] Source for bash_completion.d/R?

2011-05-02 Thread Dirk Eddelbuettel
On 2 May 2011 at 11:32, Sharpie wrote: | Hello, I was just tweaking the R build for the Homebrew package manager and I | thought it would be nice to enable bash completion. I noticed that | Debian-based systems install `/etc/bash_completion.d/R` but could not find a | source for this file in the `

Re: [Rd] Capturing the expression representing the body of a function

2011-05-02 Thread Hadley Wickham
> The body of a function isn't an expression, it's a language object.  A > language object is represented internally as a pairlist, while an expression > is represented as a generic vector, i.e. the thing that list() gives. That doesn't agree with the documentation of is.language which implies a l

Re: [Rd] Capturing the expression representing the body of a function

2011-05-02 Thread Gabor Grothendieck
On Mon, May 2, 2011 at 4:11 PM, Duncan Murdoch wrote: > On 02/05/2011 3:21 PM, Hadley Wickham wrote: >> >> Hi all, >> >> What's the preferred way of capturing the expression representing the >> contents of a function? >> >> * body(write.csv) gives me a braced expression >> * body(write.csv)[-1] gi

Re: [Rd] Capturing the expression representing the body of a function

2011-05-02 Thread Duncan Murdoch
On 02/05/2011 3:21 PM, Hadley Wickham wrote: Hi all, What's the preferred way of capturing the expression representing the contents of a function? * body(write.csv) gives me a braced expression * body(write.csv)[-1] gives me a mangled call * as.list(body(write.csv)[-1]) gives me a list of calls

Re: [Rd] How to create vignette.pdf for R-2.13.0?

2011-05-02 Thread cstrato
Dear Prof. Ripley, Thank you for your confirmation and explanation, I understand the reason for cleaning things up to save memory. However, it was very convenient to have this feature in earlier versions of R. It would be really helpful to have an additional option to R CMD check, e.g. "--no-

[Rd] Capturing the expression representing the body of a function

2011-05-02 Thread Hadley Wickham
Hi all, What's the preferred way of capturing the expression representing the contents of a function? * body(write.csv) gives me a braced expression * body(write.csv)[-1] gives me a mangled call * as.list(body(write.csv)[-1]) gives me a list of calls * as.expression(as.list(body(write.csv)[-1]))

Re: [Rd] R CMD check and Suggests Packages

2011-05-02 Thread Hervé Pagès
Hi, On 11-04-28 07:00 PM, Dario Strbenac wrote: Hello, In my description file, I have an example data package in Suggests: that I've deleted from my library to test what the user who doesn't have it will experience. However, R CMD check won't even pass my package : * checking package depend

[Rd] Source for bash_completion.d/R?

2011-05-02 Thread Sharpie
Hello, I was just tweaking the R build for the Homebrew package manager and I thought it would be nice to enable bash completion. I noticed that Debian-based systems install `/etc/bash_completion.d/R` but could not find a source for this file in the `etc` folder of the R source. Is the R bash comp

[Rd] raw connections: reading does not alter current position pointer

2011-05-02 Thread William Dunlap
Am I misunderstanding rawConnections here or are rawConnections not working right yet? It looks like I can use seek() to position the read pointer but readBin does not position the read pointer past what has just been read. > myRawTen <- as.raw(101:110) > str(myRawTen) raw [1:10] 65 66 67

[Rd] Replacing '.self' with an .Rda image of '.self' from within a method?

2011-05-02 Thread Janko Thyson
Dear list, Is it possible to update or reassign '.self' with an image of '.self' (e.g. a locally stored .Rda file) from within a method? I know that this might sound akward, but here's the use case: 1) Ref Class Definition setRefClass(Class="Test", fields=list(A="character", B="cha

[Rd] R 2.13 segfault with range()

2011-05-02 Thread Terry Therneau
Running on a shared CENTOS server tmt711% R --vanilla R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribu

[Rd] write.csv and match.call

2011-05-02 Thread Hadley Wickham
Hi all, Can help me understand why write.csv manipulates a call object instead of simply calling write.table with modified arguments? I would have written write.csv as: write.csv <- function (...) { Call <- match.call(expand.dots = TRUE) for (argname in c("append", "col.names", "sep", "de

Re: [Rd] Using substitute to access the expression related to a promise

2011-05-02 Thread Hadley Wickham
On Mon, May 2, 2011 at 9:10 AM, Duncan Murdoch wrote: > On 02/05/2011 9:53 AM, Hadley Wickham wrote: >> >> Hi all, >> >> The help for delayedAssign suggests that you can use substitute to >> access the expression associated with a promise, and the help for >> substitute says: "If it is a promise o

Re: [Rd] Using substitute to access the expression related to a promise

2011-05-02 Thread Gabor Grothendieck
On Mon, May 2, 2011 at 10:10 AM, Duncan Murdoch wrote: > On 02/05/2011 9:53 AM, Hadley Wickham wrote: >> >> Hi all, >> >> The help for delayedAssign suggests that you can use substitute to >> access the expression associated with a promise, and the help for >> substitute says: "If it is a promise

Re: [Rd] Using substitute to access the expression related to a promise

2011-05-02 Thread Duncan Murdoch
On 02/05/2011 9:53 AM, Hadley Wickham wrote: Hi all, The help for delayedAssign suggests that you can use substitute to access the expression associated with a promise, and the help for substitute says: "If it is a promise object, i.e., a formal argument to a function or explicitly created using

Re: [Rd] Using substitute to access the expression related to a promise

2011-05-02 Thread Gabor Grothendieck
On Mon, May 2, 2011 at 9:53 AM, Hadley Wickham wrote: > Hi all, > > The help for delayedAssign suggests that you can use substitute to > access the expression associated with a promise, and the help for > substitute says: "If it is a promise object, i.e., a formal argument > to a function or expli

[Rd] Using substitute to access the expression related to a promise

2011-05-02 Thread Hadley Wickham
Hi all, The help for delayedAssign suggests that you can use substitute to access the expression associated with a promise, and the help for substitute says: "If it is a promise object, i.e., a formal argument to a function or explicitly created using ‘delayedAssign()’, the expression slot of the