Re: [Rd] x <- 1:2; dim(x) <- 2? A vector or not?

2009-01-13 Thread Prof Brian Ripley
What you have is a one-dimensional array: they crop up in R most often from table() in my experience. f <- table(rpois(100, 4)) str(f) 'table' int [, 1:10] 2 6 18 21 13 16 13 4 3 4 - attr(*, "dimnames")=List of 1 ..$ : chr [1:10] "0" "1" "2" "3" ... and yes, f is an atmoic vector and yes,

Re: [Rd] R as a scripting engine

2009-01-13 Thread Wacek Kusnierczyk
Dirk Eddelbuettel wrote: > On 11 January 2009 at 20:18, Prof Brian Ripley wrote: > | Those of you tracking R development will have noticed that we are > | moving towards using R as a scripting engine. > [...] > | Reasons: > | > | - it is platform-independent and needs no other tools installed. >

[Rd] Missing links on Windows and \link[bar]{foo}; clarification

2009-01-13 Thread Gavin Simpson
Dear List, In one of my packages on R-Forge I have a custom panel function for Lattice graphics. In the Rd file for this panel function I want to provide links to some lattice functions (in package lattice). My first instinct was to use: \code{\link[lattice]{panel.xyplot}} for example. However,

Re: [Rd] Missing links on Windows and \link[bar]{foo}; clarification

2009-01-13 Thread Prof Brian Ripley
You would expect to see issues on Windows whilst checking, as cross-library links do not work on Windows (unless fixed up, which install.packages() does for some standard packages, not including lattice which is 'recommended' not 'standard'). And, depending where you install, perhaps during in

Re: [Rd] Package Matrix does not compile in R-devel_2009-01-10

2009-01-13 Thread Prof Brian Ripley
I've discovered that Mac OS still has a FreeBSD make with which I can reproduce this. So I am working with Martin on a patch for the next Matrix update. Meanwhile, if there is an issue with building R-devel with GNU make under FreeBSD (e.g. env MAKE=gmake ./configure env MAKE=gmake make )

Re: [Rd] Missing links on Windows and \link[bar]{foo}; clarification

2009-01-13 Thread Gavin Simpson
On Tue, 2009-01-13 at 11:12 +, Prof Brian Ripley wrote: > You would expect to see issues on Windows whilst checking, as > cross-library links do not work on Windows (unless fixed up, which > install.packages() does for some standard packages, not including > lattice which is 'recommended' no

Re: [Rd] Missing links on Windows and \link[bar]{foo}; clarification

2009-01-13 Thread Prof Brian Ripley
On Tue, 13 Jan 2009, Gavin Simpson wrote: On Tue, 2009-01-13 at 11:12 +, Prof Brian Ripley wrote: You would expect to see issues on Windows whilst checking, as cross-library links do not work on Windows (unless fixed up, which install.packages() does for some standard packages, not includin

Re: [Rd] irrelevant warning message

2009-01-13 Thread Terry Therneau
Thanks for the replies: Duncan: > and got a warning in all R versions I tried back to 2.4.1. In 2.3.1 > this was an error. It seems I have egg on my face wrt this point. A more true synopsis of what I saw should have been that 1. I've never noticed this in R before and 2. Until recently

Re: [Rd] irrelevant warning message

2009-01-13 Thread Gabor Grothendieck
On Tue, Jan 13, 2009 at 8:28 AM, Terry Therneau wrote: > Thanks for the replies: > > Duncan: >> and got a warning in all R versions I tried back to 2.4.1. In 2.3.1 >> this was an error. > > It seems I have egg on my face wrt this point. A more true synopsis of what > I > saw should have been t

Re: [Rd] R as a scripting engine

2009-01-13 Thread Duncan Murdoch
On 1/13/2009 4:33 AM, Wacek Kusnierczyk wrote: Dirk Eddelbuettel wrote: On 11 January 2009 at 20:18, Prof Brian Ripley wrote: | Those of you tracking R development will have noticed that we are | moving towards using R as a scripting engine. [...] | Reasons: | | - it is platform-independent a

Re: [Rd] x <- 1:2; dim(x) <- 2? A vector or not?

2009-01-13 Thread Henrik Bengtsson
Hi. On Mon, Jan 12, 2009 at 11:58 PM, Prof Brian Ripley wrote: > What you have is a one-dimensional array: they crop up in R most often from > table() in my experience. > >> f <- table(rpois(100, 4)) >> str(f) > > 'table' int [, 1:10] 2 6 18 21 13 16 13 4 3 4 > - attr(*, "dimnames")=List of 1 >

[Rd] particulars of importing/loading libraries

2009-01-13 Thread Sklyar, Oleg (London)
Dear List: Sorry for posting maybe a trivial question, but I have a basic understanding problem. If I have say pack1 and pack2, two R packages, and pack2 depends on and imports pack1 fully (as in the code below), is there a way to make all the functionality of pack1 available for the global and ot

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Martin Morgan
Hi Oleg -- "Sklyar, Oleg (London)" writes: > Dear List: > > Sorry for posting maybe a trivial question, but I have a basic > understanding problem. If I have say pack1 and pack2, two R packages, > and pack2 depends on and imports pack1 fully (as in the code below), is > there a way to make all t

Re: [Rd] x <- 1:2; dim(x) <- 2? A vector or not?

2009-01-13 Thread Patrick Burns
Henrik Bengtsson wrote: Hi. On Mon, Jan 12, 2009 at 11:58 PM, Prof Brian Ripley wrote: What you have is a one-dimensional array: they crop up in R most often from table() in my experience. f <- table(rpois(100, 4)) str(f) 'table' int [, 1:10] 2 6 18 21 13 16 13 4 3 4 - attr

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Sklyar, Oleg (London)
I was thinking of this, but this is going to be a pain if a package imports 5 packs, is being imported by another one, which itself is imported by yet another one and the only one one would like to load explicitly is the last down the line. If I do not find a better solution this is what I probably

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Sklyar, Oleg (London)
So essentially I guess it would be nice to have a way of reexporting everything in get("imports",env=pack2:::.__NAMESPACE__.) Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com > -Original Message- > From: Martin Morgan [mailt

Re: [Rd] R as a scripting engine

2009-01-13 Thread Simon Urbanek
Oh, well, now that the post count is growing I guess I have to respond ;). On Jan 11, 2009, at 15:50 , Dirk Eddelbuettel wrote: On 11 January 2009 at 20:18, Prof Brian Ripley wrote: | Those of you tracking R development will have noticed that we are | moving towards using R as a scripting en

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Paul Gilbert
Maybe I'm missing something (it wouldn't be the first time), but I think your problem is that pack2 needs a function .onLoad <- function(library, section) {require("pack1")} since you actually want the functions from pack1 available, and not just its namespace. ( And you will need the "pac

Re: [Rd] R as a scripting engine

2009-01-13 Thread Dirk Eddelbuettel
Hi Simon, On 13 January 2009 at 12:36, Simon Urbanek wrote: | Oh, well, now that the post count is growing I guess I have to | respond ;). | | On Jan 11, 2009, at 15:50 , Dirk Eddelbuettel wrote: | | > | > On 11 January 2009 at 20:18, Prof Brian Ripley wrote: | > | Those of you tracking R dev

Re: [Rd] R as a scripting engine

2009-01-13 Thread Dirk Eddelbuettel
Just to bore everyone but Simon and me to tears, here is 'fair' timing2.sh variant using an r version that does not autoload(). e...@ron:/tmp$ ./timing3.sh --- our r calling summary() 20 times real0m3.375s user0m3.100s sys 0m0.268s --- GNU R's Rscript calling summary() 20 times r

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Oleg Sklyar
I will give it a try with .onLoad, but I am not sure why this should be required. I do not think this is the solution for the problem as at the times when there were no namespaces, adding a library in Depends of the Description file was sufficient. As for the second point I am aware of that, b

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Simon Urbanek
Oleg, On Jan 13, 2009, at 11:00 , Sklyar, Oleg (London) wrote: Dear List: Sorry for posting maybe a trivial question, but I have a basic understanding problem. If I have say pack1 and pack2, two R packages, and pack2 depends on and imports pack1 fully (as in the code below), is there a way

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Martin Morgan
Simon Urbanek writes: > Oleg, > > On Jan 13, 2009, at 11:00 , Sklyar, Oleg (London) wrote: > >> Dear List: >> >> Sorry for posting maybe a trivial question, but I have a basic >> understanding problem. If I have say pack1 and pack2, two R packages, >> and pack2 depends on and imports pack1 fully