Re: [Rd] where is libRmath.a & libRmath.so

2010-05-14 Thread Duncan Murdoch
On 14/05/2010 4:52 PM, Dave Lubbers wrote: R 2.7.2 - the manual says configure make Which is what I did. So I did read the manual and followed the directions. The manual is too terse to get me there. You used the wrong tense. In referring to R 2.7.2, only past tenses are grammaticall

Re: [Rd] where is libRmath.a & libRmath.so

2010-05-14 Thread Dirk Eddelbuettel
On 14 May 2010 at 13:52, Dave Lubbers wrote: | | R 2.7.2 - the manual says | configure | make | | Which is what I did. So I did read the manual and followed the directions. | The manual is too terse to get me there. On Debian / Ubuntu, you can also do sudo apt-get install r-mathlib to

Re: [Rd] where is libRmath.a & libRmath.so

2010-05-14 Thread Simon Urbanek
On May 14, 2010, at 4:52 PM, Dave Lubbers wrote: > > R 2.7.2 - the manual says > configure > make > > Which is what I did. So I did read the manual and followed the directions. > The manual is too terse to get me there. cd src/nmath/standalone make Cheers, Simon > -- > View this messa

Re: [Rd] S4 default/missing args

2010-05-14 Thread John Chambers
From the documentation for setMethod(): Method definitions can have default expressions for arguments, but a current limitation is that the generic function must have some default expression for the same argument in order for the method's defaults to be used. <> (It would be nice to fix

Re: [Rd] where is libRmath.a & libRmath.so

2010-05-14 Thread Dave Lubbers
R 2.7.2 - the manual says configure make Which is what I did. So I did read the manual and followed the directions. The manual is too terse to get me there. -- View this message in context: http://r.789695.n4.nabble.com/where-is-libRmath-a-libRmath-so-tp2216048p2217224.html Sent from the R

Re: [Rd] The parsing of '{' and a function that equal to '{'

2010-05-14 Thread Simon Urbanek
On May 14, 2010, at 3:38 PM, thmsfuller...@gmail.com wrote: > Hello All, > > I tried the sample code from the help. Although '{' is assigned to > 'do', the call syntaxes for 'do' and '{' are not the same ('do' has > ','s, but '{' has line breaks). I guess there is a difference in > parsing the c

[Rd] The parsing of '{' and a function that equal to '{'

2010-05-14 Thread thmsfuller...@gmail.com
Hello All, I tried the sample code from the help. Although '{' is assigned to 'do', the call syntaxes for 'do' and '{' are not the same ('do' has ','s, but '{' has line breaks). I guess there is a difference in parsing the code block of 'do' and the code block of '{'. Could you please let me know

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Duncan Murdoch
On 14/05/2010 10:14 AM, thmsfuller...@gmail.com wrote: Hello All, By default, a reference of a variable in a function cause R to look for the variable in the parent environment if it is not available in the current environment (without generating any errors or warnings). I'm wondering if there i

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Simon Urbanek
On May 14, 2010, at 11:33 AM, thmsfuller...@gmail.com wrote: > On Fri, May 14, 2010 at 10:13 AM, Simon Urbanek > wrote: >> >> On May 14, 2010, at 10:29 AM, Jeff Ryan wrote: >> >>> This isn't like a local variable though, since any function above the >>> baseenv() in the search path will also n

[Rd] S4 default/missing args

2010-05-14 Thread Paul Gilbert
I am trying to understand the missing vs default value for an argument to an S4 method. (I'm not sure if this is a bug or my confusion.) In S3 I can specify a default value for an argument and then both check if the argument was missing in the call, and use it because it takes on the default value.

Re: [Rd] [R] Subscripting a matrix-like object

2010-05-14 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Jeffrey J. Hallman > Sent: Friday, May 14, 2010 9:17 AM > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] Subscripting a matrix-like object > > jhall...@frb.gov writes: > > Answ

[Rd] Fwd: Compiling R with ATLAS

2010-05-14 Thread Avraham Adler
(Resent as plain text, sorry) Thank you. I am doing it this way as I really do not know much about Linux, and I would not know how to re-compile Rblas and Rlapack with the ATLAS BLAS and tuned LAPACK after I install the precompiled packages through synaptic. This way, ostensibly, I should be comp

Re: [Rd] Compiling R with ATLAS

2010-05-14 Thread Avraham Adler
Thank you. I am doing it this way as I really do not know much about Linux, and I would not know how to re-compile Rblas and Rlapack with the ATLAS BLAS and tuned LAPACK after I install the precompiled packages through synaptic. This way, ostensibly, I should be compiling it from scratch so it sho

Re: [Rd] results of pnorm as either NaN or Inf

2010-05-14 Thread efreeman
Thank you for your responses. I presented a minimal example of the issue, but I should have explained that this came up in the context of maximizing a log likelihood function (with optim). I certainly agree that there would be no good reason for a human to evaluate the function pnorm(-x, log.p=TR

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread thmsfuller...@gmail.com
On Fri, May 14, 2010 at 10:13 AM, Simon Urbanek wrote: > > On May 14, 2010, at 10:29 AM, Jeff Ryan wrote: > >> This isn't like a local variable though, since any function above the >> baseenv() in the search path will also not be found. >> > > Yes, but that is a consequence of the request and henc

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Simon Urbanek
On May 14, 2010, at 10:29 AM, Jeff Ryan wrote: > This isn't like a local variable though, since any function above the > baseenv() in the search path will also not be found. > Yes, but that is a consequence of the request and hence intended. You can always either specify the full path to the f

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Hadley Wickham
On Fri, May 14, 2010 at 10:10 AM, Gabor Grothendieck wrote: > You can get around that by using this instead: > > environment(f) <- as.environment(2) > > provided it is done after you have loaded all your packages. Another approach is to inspect function by function: library(codetools) findGlobal

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Gabor Grothendieck
You can get around that by using this instead: environment(f) <- as.environment(2) provided it is done after you have loaded all your packages. On Fri, May 14, 2010 at 10:29 AM, Jeff Ryan wrote: > This isn't like a local variable though, since any function above the > baseenv() in the search pa

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Jeff Ryan
This isn't like a local variable though, since any function above the baseenv() in the search path will also not be found. > f function(a) { rnorm(b) } > f() Error in f() : could not find function "rnorm" Jeff On Fri, May 14, 2010 at 9:20 AM, Hadley Wickham wrote: > > Hello All, > > > > By d

Re: [Rd] Restrict access to variables in parent environment

2010-05-14 Thread Hadley Wickham
> Hello All, > > By default, a reference of a variable in a function cause R to look > for the variable in the parent environment if it is not available in > the current environment (without generating any errors or warnings). > I'm wondering if there is a way to revert this behaviors, such that it

[Rd] Restrict access to variables in parent environment

2010-05-14 Thread thmsfuller...@gmail.com
Hello All, By default, a reference of a variable in a function cause R to look for the variable in the parent environment if it is not available in the current environment (without generating any errors or warnings). I'm wondering if there is a way to revert this behaviors, such that it will not l

Re: [Rd] update.packages fails with directory not found

2010-05-14 Thread Mike Prager
Bill, Thanks. The problem is common but not consistent on update. I'll wait a few days for packages to be updated at CRAN, then try it. Mike On Wed, 12 May 2010 08:49:42 -0700, "William Dunlap" wrote: > If you have the time and can consistently reproduce >this problem you might try using S

Re: [Rd] Compiling R with ATLAS

2010-05-14 Thread Douglas Bates
There is a Debian/Ubuntu specific list, r-sig-deb...@r-project.org, which I am cc:'ing on this reply, that is a better location for this discussion. It appears that you may be going about things the hard way. There are Ubuntu packages for atlas and for R that can handle all of this for you. Take

[Rd] Compiling R with ATLAS

2010-05-14 Thread Avraham Adler
Hello. I know almost nothing about Linux, so I apologize if the answer to this is obvious. I am trying to compile R with ATLAS (successfully compiled 3.9.24 on Ubuntu 10.04 64 bit). I configured with: ./configure --enable-R-shlib --enable-BLAS-shlib --with-blas="-L/usr/local/atlas/lib -lf77blas -

Re: [Rd] Using Sweave in hostile environments

2010-05-14 Thread Duncan Murdoch
Just for the archives, a partial answer to my question: I was unable to find a definition for the Sinput environment that would work, but relatively minor changes to some of the RweaveLatex functions cause Sweave to generate SaveVerbatim environments rather than Sinput environments, and that's

Re: [Rd] results of pnorm as either NaN or Inf

2010-05-14 Thread Prof Brian Ripley
The answer to pnorm(-x, log.p=TRUE) is of course about -0.5*x*x for large x. So trying to compute it for -1e108 is a bit silly, both on your part and the C code used. I've altered the C code not to attempt it for x > 1e170, which excludes the area where underflow occurs. On Fri, 14 May 2010,

Re: [Rd] Creating an S3 method when the generic function is defined in another (imported) package

2010-05-14 Thread Arne Henningsen
On 14 May 2010 10:37, Achim Zeileis wrote: > On Fri, 14 May 2010, Arne Henningsen wrote: > >> Hi, >> >> In one of my packages (maxLik), I would like to add an S3 method, >> where the generic function (estfun) is defined in another package >> (sandwich). Everything works fine if my package "Depends

Re: [Rd] Creating an S3 method when the generic function is defined in another (imported) package

2010-05-14 Thread Achim Zeileis
On Fri, 14 May 2010, Arne Henningsen wrote: Hi, In one of my packages (maxLik), I would like to add an S3 method, where the generic function (estfun) is defined in another package (sandwich). Everything works fine if my package "Depends" on the other package and I import the generic function "e

[Rd] Creating an S3 method when the generic function is defined in another (imported) package

2010-05-14 Thread Arne Henningsen
Hi, In one of my packages (maxLik), I would like to add an S3 method, where the generic function (estfun) is defined in another package (sandwich). Everything works fine if my package "Depends" on the other package and I import the generic function "estfun" from the "sandwich" package and define t

Re: [Rd] where is libRmath.a & libRmath.so

2010-05-14 Thread Uwe Ligges
On 14.05.2010 04:47, Dave Lubbers wrote: I see Rmath.h in include. Why can't I find libRmath.a and/or libRmath.so? Since you have not compiled them yet? See the R Installation and Administration manual. Uwe Ligges __ R-devel@r-project.org mai