Re: [Rd] help with eval()

2011-04-18 Thread Prof Brian Ripley
On Mon, 18 Apr 2011, Duncan Murdoch wrote: On 11-04-18 5:51 PM, Terry Therneau wrote: I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3<- as.formula("time ~ age") dfun3<- function(dcall) { fit<- lm(dcall, data=lung, model=FALSE) model.fra

Re: [Rd] help with eval()

2011-04-18 Thread Gabor Grothendieck
On Mon, Apr 18, 2011 at 5:51 PM, Terry Therneau wrote: > I've narrowed my scope problems with predict.coxph further. > Here is a condensed example: > > fcall3 <- as.formula("time ~ age") > dfun3 <- function(dcall) { >    fit <- lm(dcall, data=lung, model=FALSE) >    model.frame(fit) > } > dfun3(fc

Re: [Rd] help with eval()

2011-04-18 Thread Duncan Murdoch
On 11-04-18 5:51 PM, Terry Therneau wrote: I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3<- as.formula("time ~ age") dfun3<- function(dcall) { fit<- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails

[Rd] help with eval()

2011-04-18 Thread Terry Therneau
I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3 <- as.formula("time ~ age") dfun3 <- function(dcall) { fit <- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails: it can't find 'dcall'. The relevant code

Re: [Rd] Tail Call Elimination?

2011-04-18 Thread luke-tierney
On Mon, 18 Apr 2011, Dominick Samperi wrote: On Mon, Apr 18, 2011 at 10:41 AM, wrote: The premise of your post is false: contrary to popular belief, R's looping constructs are not particularly inefficient. Slowness of loops relative to vectorized code comes from the cost of interpreting the b

Re: [Rd] Use keep.source for function in package with lazy loading

2011-04-18 Thread Greg Snow
Thanks, that looks great. Looking for other options I found a way to do something I had not originally considered, but like even better now. My original purpose on this was a string with some tabs in it that when the function was viewed without the source were turned into "\t" which looked u

[Rd] Statonnector fails (was Re: R fails on Windows 2008 Server)

2011-04-18 Thread Prof Brian Ripley
This isn't 'R fails', it is 'StatConnector' fails. That project is nothing to do with this list, so please don't ask here for free consultancy on it (and fail to give any of the information asked for in our posting guide). On Mon, 18 Apr 2011, Shawna JOB wrote: Does anyone have any pointers

Re: [Rd] Dangerous Bug with IF function of R

2011-04-18 Thread salmajj
Thanks a lot Petr it works!!! You know for someone who is used to work with matlab it is not so obvious:) -- View this message in context: http://r.789695.n4.nabble.com/Dangerous-Bug-with-IF-function-of-R-tp3457976p3458300.html Sent from the R devel mailing list archive at Nabble.com. __

Re: [Rd] Dangerous Bug with IF function of R

2011-04-18 Thread Petr Savicky
On Mon, Apr 18, 2011 at 09:12:41AM -0700, salmajj wrote: > hi! > there is a bug with the IF operator that is really dangerous! > please try the code below and if someone could explain to me why when (q is > equal to 0.8, 0.9 or 1) R do not print it? > > q=0 > for (j in 1:11){ > > if ((q==1)){ > p

[Rd] R fails on Windows 2008 Server

2011-04-18 Thread Shawna JOB
Does anyone have any pointers on troubleshooting an R installation on a Windows 2008 server? I had it running on a Windows 2003 server after many permissions updates to the server, but I'm stumped on getting it to run on 2008. --The error I'm getting when I run the StatConnector Test is: Loadin

Re: [Rd] Dangerous Bug with IF function of R

2011-04-18 Thread Brian Diggs
On 4/18/2011 9:12 AM, salmajj wrote: hi! there is a bug with the IF operator that is really dangerous! please try the code below and if someone could explain to me why when (q is equal to 0.8, 0.9 or 1) R do not print it? q=0 for (j in 1:11){ if ((q==1)){ print(q) }

[Rd] Dangerous Bug with IF function of R

2011-04-18 Thread salmajj
hi! there is a bug with the IF operator that is really dangerous! please try the code below and if someone could explain to me why when (q is equal to 0.8, 0.9 or 1) R do not print it? q=0 for (j in 1:11){ if ((q==1)){ print(q) } q=q+0.1 } so in this code q is incr

[Rd] How to get R to compile with PNG support

2011-04-18 Thread Karl-Dieter Crisman
Dear R devel list, Good morning; I'm with the Sage (http://www.sagemath.org) project. (Some of you might have seen my talk on this at last summer's useR conference). We have some rudimentary support for using R graphics in various cases, which has proved useful to many of our users who want to go

Re: [Rd] Tail Call Elimination?

2011-04-18 Thread Dominick Samperi
On Mon, Apr 18, 2011 at 10:41 AM, wrote: > The premise of your post is false: contrary to popular belief, R's > looping constructs are not particularly inefficient. Slowness of loops > relative to vectorized code comes from the cost of interpreting the > body of the loop.  That exact same interpr

Re: [Rd] Tail Call Elimination?

2011-04-18 Thread luke-tierney
The premise of your post is false: contrary to popular belief, R's looping constructs are not particularly inefficient. Slowness of loops relative to vectorized code comes from the cost of interpreting the body of the loop. That exact same interpreter would be used to interpret the bodies of func

[Rd] sessionInfo() and byte compiler

2011-04-18 Thread Allan Engelhardt
For troubleshooting purposes, should utils::sessionInfo() show if the attached packages (especially base packages) are byte compiled (with make bytecode and/or R_COMPILE_PKGS set and not zero)? Allan __ R-devel@r-project.org mailing list https://stat

Re: [Rd] R script in batch mode

2011-04-18 Thread Prof Brian Ripley
On Sun, 17 Apr 2011, jusce wrote: Hello All! I'm a new R user, with no much experience. I have a R script (downloaded from internet) which has user interaction using "readline()" function. So as I have to run it repeatdly (with some different options) I was planning to do it on a BATCH mode. I