[Rd] Idempotent apply

2006-06-09 Thread hadley wickham
Dear all, I have been working on an idempotent version of apply, such that applying a function f(x) = x (ie. force) returns the same array (or a permutation of it depending on the order of the margins): a <- array(1:27, c(2,3,4)) all.equal(a, iapply(a, 1, force)) all.equal(a, iapply(a, 1:2, forc

Re: [Rd] Idempotent apply

2006-06-09 Thread Robin Hankin
Hi Hadley, Rteam, I encountered similar issues trying to reproduce Matlab's "sort" functionality. [here "a" is array(1:27, c(2,3,4))] In matlab, one can type sort(a,i) to sort along dimension i. One can reproduce this functionality thus: asort <- function(a,i,FUN="sort"){ j <- 1:length(dim

[Rd] R CMD check and directory/package name

2006-06-09 Thread Heather Turner
The NEWS for R 2.3.0 states that "R CMD check works for packages whose package name is different from the directory name in which it is located." However that hasn't been my experience. I ran R CMD check on package sources located in a directory with the same name as the package and it worked a

[Rd] R bug - crash of the complete session (PR#8950)

2006-06-09 Thread korschi
Full_Name: Eberhard Korsching Version: 2.3.0 OS: Win2K SR4 Submission from: (NULL) (128.176.44.202) Hello, maybe the problem is solved for WinXP and R 2.3.1 - but I have not tested. Situation: R session open, some script windows open. Running a script producing a big graphic concerning the plot

[Rd] read.fwf only reads one "buffersize" of lines when reading multiline records (PR#8951)

2006-06-09 Thread davidhughjones
Full_Name: David Hugh-Jones Version: 2.3.0 OS: Windows Submission from: (NULL) (155.245.34.194) Here's a test case: tf = tempfile() cat(file=tf, rep("123", 100), sep="\n") # this gives a data frame with 100 rows read.fwf(tf, widths=c(1,2), buffersize=10) # but this only gives 5 rows! read.fwf(t

Re: [Rd] install.packages("C", dep=TRUE) does not always install indirect dependencies

2006-06-09 Thread Herve Pages
Duncan Murdoch wrote: > On 6/8/2006 3:31 PM, Herve Pages wrote: >> May be this is the desired behavior, I don't know. Personally, I would >> think of 'install.packages("C", dep=TRUE)' as a reliable way to get >> every >> packages that C directly or indirectly relies on installed. > > This seems ra

Re: [Rd] install.packages("C", dep=TRUE) does not always install indirect dependencies

2006-06-09 Thread Duncan Murdoch
On 6/9/2006 1:47 PM, Herve Pages wrote: > Duncan Murdoch wrote: >> On 6/8/2006 3:31 PM, Herve Pages wrote: >>> May be this is the desired behavior, I don't know. Personally, I would >>> think of 'install.packages("C", dep=TRUE)' as a reliable way to get >>> every >>> packages that C directly or in

[Rd] Environment variable MAKE not defined on Windows

2006-06-09 Thread Martin Morgan
On Windows, > Sys.getenv("MAKE") MAKE "" when (at a DOS prompt) X:>set MAKE Environment variable MAKE not defined On linux, > Sys.getenv("MAKE") MAKE "make" even when (in a shell) % echo $MAKE returns nothing. This has consequences, e.g., in buildVignette where system(Sys.getenv(

Re: [Rd] Environment variable MAKE not defined on Windows

2006-06-09 Thread Duncan Murdoch
On 6/9/2006 4:03 PM, Martin Morgan wrote: > On Windows, > >> Sys.getenv("MAKE") > MAKE > "" > > when (at a DOS prompt) > > X:>set MAKE > Environment variable MAKE not defined > > On linux, > >> Sys.getenv("MAKE") > MAKE > "make" > > even when (in a shell) > > % echo $MAKE > > return

Re: [Rd] Environment variable MAKE not defined on Windows

2006-06-09 Thread Martin Morgan
Duncan Murdoch <[EMAIL PROTECTED]> writes: > On 6/9/2006 4:03 PM, Martin Morgan wrote: >> On Windows, >> >>> Sys.getenv("MAKE") >> MAKE "" when (at a DOS prompt) >> X:>set MAKE >> Environment variable MAKE not defined > > Most Windows systems don't have a working "make" command, and I don't > kn

Re: [Rd] Environment variable MAKE not defined on Windows

2006-06-09 Thread Duncan Murdoch
On 6/9/2006 7:37 PM, Martin Morgan wrote: > Duncan Murdoch <[EMAIL PROTECTED]> writes: > >> On 6/9/2006 4:03 PM, Martin Morgan wrote: >>> On Windows, >>> Sys.getenv("MAKE") >>> MAKE "" when (at a DOS prompt) >>> X:>set MAKE >>> Environment variable MAKE not defined >> Most Windows systems d

Re: [Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows

2006-06-09 Thread Herve Pages
Simon Urbanek wrote: > On Jun 8, 2006, at 9:08 PM, Herve Pages wrote: > >> Man page for 'install.packages' says that if the 'lib' arg is missing, >> then it "defaults to '.libPaths()[1]' with a warning". > > Where are you quoting from? I read (R 2.3.1): Hi Simon, I was quoting from the descriptio