Re: [Rd] Issue with Mac OSX version of R (PR#13275)

2008-11-11 Thread Simon Urbanek
Please do your homework before posing invalid bug reports -- apparently the mirror you're using is not currently working - so just pick another one. Also "Other Directory URL" is NOT for repositories as the name implies (ever wondered why there is a "Other Repository" entry?). Thanks, S

[Rd] Issue with Mac OSX version of R (PR#13275)

2008-11-11 Thread gpapkov
Full_Name: Galen papkov Version: 2.8.0 OS: Tiger v.10.4.11 Submission from: (NULL) (129.7.91.106) The Package Installer cannot seem to find the CRAN source. When I try to "Get List", I get the following error: Error in read.dcf(file = tmpf) : Found continuation line starting 'http://cran

Re: [Rd] is.matrix

2008-11-11 Thread William Dunlap
S+, now and as far back as 3.4 (1996) and S versions 3 (c. 1990) and 4 (1999) define is.matrix as function(x)length(dim(x)) == 2 so is.matrix(data.frame(x=1:3,y=4:6)) returns TRUE. It essentially means that you can use 2 subscripts on the object (it assumes that the dim() method for class(x) is

[Rd] Timeseries - window - extend problem (PR#13272)

2008-11-11 Thread patrickbolliger
Full_Name: Patrick Bolliger Version: R 2.8.0 OS: Windows XP Submission from: (NULL) (165.222.185.132) I cannot understand the behaviour of the following snippet... I guess it has to do with the representation of the floating number .6 --

[Rd] erf calculation (PR#13271)

2008-11-11 Thread Jerry . Lewis
Full_Name: Jerry W. Lewis Version: 2.8.0 OS: Windows XP Professional Submission from: (NULL) (71.184.139.210) On p.1202 of the Reference manual, calculating erf(x) is given as an example using the code erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1 A numerically better (avoiding cancellation for

[Rd] error during list allocation

2008-11-11 Thread Wacek Kusnierczyk
platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 8.0

Re: [Rd] is.matrix

2008-11-11 Thread hadley wickham
On Tue, Nov 11, 2008 at 1:58 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > hadley wickham wrote: >> On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk >> <[EMAIL PROTECTED]> wrote: >> >>> hadley wickham wrote: >>> > | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | > att

Re: [Rd] is.matrix

2008-11-11 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > hadley wickham wrote: > >>> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | >>> attribute of length 2) and |FALSE| otherwise >>> >>> >> That's confusing! In what situations is x a matrix but does not have >> a dim attribute? >> >> >>

Re: [Rd] is.matrix

2008-11-11 Thread Wacek Kusnierczyk
hadley wickham wrote: > On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk > <[EMAIL PROTECTED]> wrote: > >> hadley wickham wrote: >> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | attribute of length 2) and |FALSE| otherwise >>> That's confusi

Re: [Rd] is.matrix

2008-11-11 Thread Wacek Kusnierczyk
Daniel Høyer Iversen wrote: >> That's confusing! In what situations is x a matrix but does not have >> a dim attribute? >> > > That was my point. I don't find it logical that > is.matrix(a) gives FALSE but > is.matrix(t( t(a) )) gives TRUE. > that's a different story, because t() performs

Re: [Rd] is.matrix

2008-11-11 Thread Christos Hatzis
The point was that c(1, 1, 2) is not a matrix but a vector, two distinct things in R. > a <- c(1, 1, 2) > class(a) [1] "numeric" > ta <- t(a) > class(ta) [1] "matrix" > class(t(ta)) [1] "matrix" The transpose operation is only defined for matrices, so if you insist to apply it to a vector, it fir

Re: [Rd] is.matrix

2008-11-11 Thread hadley wickham
On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > hadley wickham wrote: >>> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | >>> attribute of length 2) and |FALSE| otherwise >>> >> >> That's confusing! In what situations is x a matrix but does not have

Re: [Rd] is.matrix

2008-11-11 Thread hadley wickham
On Tue, Nov 11, 2008 at 1:35 PM, Daniel Høyer Iversen <[EMAIL PROTECTED]> wrote: >> That's confusing! In what situations is x a matrix but does not have >> a dim attribute? > > That was my point. I don't find it logical that > is.matrix(a) gives FALSE but > is.matrix(t( t(a) )) gives TRUE. > > I a

Re: [Rd] is.matrix

2008-11-11 Thread Wacek Kusnierczyk
hadley wickham wrote: >> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | >> attribute of length 2) and |FALSE| otherwise >> > > That's confusing! In what situations is x a matrix but does not have > a dim attribute? > > x = matrix(1,1,1) dim(x) = c(1,1,1) is.matrix(x) # n

Re: [Rd] is.matrix

2008-11-11 Thread Daniel Høyer Iversen
> That's confusing! In what situations is x a matrix but does not have > a dim attribute? That was my point. I don't find it logical that is.matrix(a) gives FALSE but is.matrix(t( t(a) )) gives TRUE. I also think it would be more logical that a=c(1,1,2) dim(a) gives 3 1 instead of NULL, Danie

Re: [Rd] is.matrix

2008-11-11 Thread Peter Dalgaard
hadley wickham wrote: | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | attribute of length 2) and |FALSE| otherwise That's confusing! In what situations is x a matrix but does not have a dim attribute? Hadley Yes, I suspect a typo there. -- O__ Peter Dalgaard

Re: [Rd] is.matrix

2008-11-11 Thread hadley wickham
> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim | > attribute of length 2) and |FALSE| otherwise That's confusing! In what situations is x a matrix but does not have a dim attribute? Hadley -- http://had.co.nz/ __ R-devel@r-project.

Re: [Rd] is.matrix

2008-11-11 Thread Tony Plate
Daniel Høyer Iversen wrote: a=c(1,1,2); is.matrix(a) gives FALSE is.matrix(t(a)) gives TRUE is.matrix(t(t(a))) gives TRUE Is this correct? Shouldn't all give FALSE? I think is.matrix should give FALSE when dimension is 1*n or n*1. __ R-devel@r-project

Re: [Rd] is.matrix

2008-11-11 Thread Christos Hatzis
And the other missing piece is that t() coerces the input vector to a 1-column matrix that can then be transposed and returned as a 1-row matrix (with a dim attribute). -Christos > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard > Sent

Re: [Rd] Linking to headers and shared library in another package

2008-11-11 Thread Prof Brian Ripley
Please review the latest version of 'Writing R Extensions'. What is documented there has been tested with packages in different libraries, including none in $(R_HOME)/library. Note however that on a Unix-alike linking even to $(R_HOME)/library/firstPkg/libs/firstPkg.so cannot work in general

Re: [Rd] is.matrix

2008-11-11 Thread Peter Dalgaard
Daniel Høyer Iversen wrote: > a=c(1,1,2); > is.matrix(a) gives FALSE > is.matrix(t(a)) gives TRUE > is.matrix(t(t(a))) gives TRUE > > Is this correct? Shouldn't all give FALSE? > I think is.matrix should give FALSE when dimension is 1*n or n*1. No this is correct. is.matrix() returns TRUE if and

[Rd] is.matrix

2008-11-11 Thread Daniel Høyer Iversen
a=c(1,1,2); is.matrix(a) gives FALSE is.matrix(t(a)) gives TRUE is.matrix(t(t(a))) gives TRUE Is this correct? Shouldn't all give FALSE? I think is.matrix should give FALSE when dimension is 1*n or n*1. __ R-devel@r-project.org mailing list https://stat

[Rd] Linking to headers and shared library in another package

2008-11-11 Thread Iago Mosqueira
Hi, A package with some C code needs to use the headers and shared library in another package during installation/compilation. The first one is achieved through the LinkingTo option in DESCRIPTION. For the second a Makevars file with PKG_LIBS=$(R_HOME)/library/firstPkg/libs/firstPkg.so was being

Re: [Rd] typo in ?pie

2008-11-11 Thread Berwin A Turlach
G'day Brian, On Mon, 10 Nov 2008 21:07:44 + (GMT) Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > 'British' spelling is in the majority amongst R-core, and preferred > for R documentation (that is in the guidelines somewhere). I have a vague memory of a discussion that ended with the conclusi

[Rd] RFC: Offline help

2008-11-11 Thread Prof Brian Ripley
I had not used offline help for many years, and when I tried to yesterday I found a number of issues (the most important of which is that I couldn't have R_DVIPSCMD="dvips -Pbdr" to send output to my office printer: the lack of error reporting is also problematic, and hid the fact that I don't