Re: [Rd] strptime(): on Linux system it seems to call system time?

2010-04-01 Thread Patrick Connolly
On Sat, 20-Mar-2010 at 06:54PM +0100, Peter Dalgaard wrote: [...] |> It seems to be completely system-dependent. On Fedora 9, I see |> |>user system elapsed |> 2.890 0.314 3.374 |> |> but on openSUSE 10.3 it is |> |>user system elapsed |> 3.924 6.992 10.917 |> |> At any

Re: [Rd] as(1:4, "numeric") versus as.numeric(1:4, "numeric")

2010-04-01 Thread Hervé Pagès
Hi John, John Chambers wrote: The example is confusing and debatable, but not an obvious bug. And your presentation of it is the cause of much of the confusion (unintentionally I'm sure). First, slipping from the as() function to methods for the coerce() function might surprise a less exper

Re: [Rd] strptime(): on Linux system it seems to call system time?

2010-04-01 Thread Prof Brian Ripley
Let me lay this to rest. For some reason the OP did not use a vectorized call to strptime but 10 individual calls (as well as making *false* claims about what strptime does and what is 'completely unnecessary', and seemingly being igorant of system.time()). I do not believe this is ever a

[Rd] Is it valid to do x == Inf?

2010-04-01 Thread Henrik Bengtsson
Hi, I found in a bit of code the following test for infinity: if (x == Inf) ... Is that valid, or should it be (as I always thought): if (is.infinite(x)) ...? Does it depend on whether 'x' is float or integer? My question is related to testing for missing values where is.na(x) is required

Re: [Rd] Is it valid to do x == Inf?

2010-04-01 Thread Barry Rowlingson
On Thu, Apr 1, 2010 at 11:03 AM, Henrik Bengtsson wrote: > Hi, > > I found in a bit of code the following test for infinity: > >  if (x == Inf) ... > > Is that valid, or should it be (as I always thought): > >  if (is.infinite(x)) ...? > > Does it depend on whether 'x' is float or integer? > > My

[Rd] Make a donation via PayPal? (was: [R] Monetary support to the R-project)

2010-04-01 Thread Liviu Andronic
Dear R developers I understand that this is not a proper r-devel message, but it still touches to the organisation of the R project. I would like to make a small donation to the project, but I am not comfortable with sending my credit card details via post or mail and, as echoed elsewhere on r-hel

Re: [Rd] Make a donation via PayPal? (was: [R] Monetary support to the R-project)

2010-04-01 Thread Prof Brian Ripley
You need to ask the Treasurer of the R Foundation, who is Kurt Hornik (and who is on vacation). On Thu, 1 Apr 2010, Liviu Andronic wrote: Dear R developers I understand that this is not a proper r-devel message, but it still touches to the organisation of the R project. More the R Foundation

[Rd] RSS feeds now link to bug reports

2010-04-01 Thread Duncan Murdoch
Sometime last year Hadley Wickham suggested that the R daily news feed (http://developer.r-project.org/RSSfeeds.html) should link to bug reports. Now that Simon has moved the bug reporting system to Bugzilla, this is finally possible, and I've just rebuilt the news items with those links in pl

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Simon Urbanek
On Mar 31, 2010, at 18:38 , Seth Falcon wrote: On 3/31/10 1:12 PM, Christophe Genolini wrote: Hi the list, I am writing a package that happen to not be compatible with linux because I did not know that the function "savePlot" was available only on windows. Is there a list of "incompatible"

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Paul Gilbert
Since this seems more like a wish-list discussion, if someone actually starts thinking about the issue I would like to add the following somewhat related point: It would be nice if there were a mechanism, in task views or that could be used by task views, to avoid attempting to install packages th

Re: [Rd] as(1:4, "numeric") versus as.numeric(1:4, "numeric")

2010-04-01 Thread Seth Falcon
On 3/31/10 4:52 PM, John Chambers wrote: The example is confusing and debatable, but not an obvious bug. And your presentation of it is the cause of much of the confusion (unintentionally I'm sure). To restate the issue (I think): In a new R session if you happen to call: selectMethod("coe

Re: [Rd] Is it valid to do x == Inf?

2010-04-01 Thread Thomas Lumley
On Thu, 1 Apr 2010, Henrik Bengtsson wrote: Hi, I found in a bit of code the following test for infinity: if (x == Inf) ... Is that valid Yes, if you don't want to also include -Inf , or should it be (as I always thought): if (is.infinite(x)) ...? If you don't want to distinguish Inf

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Simon Urbanek
On Apr 1, 2010, at 11:59 , Paul Gilbert wrote: Since this seems more like a wish-list discussion, if someone actually starts thinking about the issue I would like to add the following somewhat related point: It would be nice if there were a mechanism, in task views or that could be used by t

[Rd] Minor typo in ?.Primitive

2010-04-01 Thread Peter Ehlers
The help page for .Primitive has this line: ## start quote This function is almost never used: get(name, envir=basenv()) works equally well and ## end quote basenv() should be baseenv(). Checked for r51392 and r51520. -Peter Ehlers __ R-dev

Re: [Rd] as(1:4, "numeric") versus as.numeric(1:4, "numeric")

2010-04-01 Thread John Chambers
The point I was making was that as() is not just a synonym for selecting a method from coerce() by the usual inheritance rules. I don't believe it should be, and the documentation emphasizes that inheritance is not used in the ordinary way. If one were to start rewriting code (which I'm not s

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Barry Rowlingson
On Thu, Apr 1, 2010 at 4:37 PM, Simon Urbanek wrote: > > On Mar 31, 2010, at 18:38 , Seth Falcon wrote: > >> On 3/31/10 1:12 PM, Christophe Genolini wrote: >>> >>> Hi the list, >>> I am writing a package that happen to not be compatible with linux >>> because I did not know that the function "save

Re: [Rd] as(1:4, "numeric") versus as.numeric(1:4, "numeric")

2010-04-01 Thread John Chambers
On 4/1/10 9:45 AM, Seth Falcon wrote: So while I agree this could be considered obscure, this qualifies as a bug in my book. It seems desirable that selectMethod not change the state of the system in a user-visible fashion. And calling selectMethod, or any other function, should not alter dis

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Duncan Murdoch
On 31/03/2010 6:38 PM, Seth Falcon wrote: On 3/31/10 1:12 PM, Christophe Genolini wrote: > Hi the list, > I am writing a package that happen to not be compatible with linux > because I did not know that the function "savePlot" was available only > on windows. Is there a list of "incompatible" fun

Re: [Rd] strptime(): on Linux system it seems to call system time?

2010-04-01 Thread Alexander Peterhansl
Thanks for the two posts. What if the timezone is set? Then the issue of system calls for the timezone falls away, no? system.time(for (i in 1:10) strptime("2010-03-10 17:00:00", "%F %H:%M:%S", tz="DST")) Output on Linux Box (64-bit R 2.10.1 running on Intel Xeon E5520 @ 2.27GHz): user

Re: [Rd] as(1:4, "numeric") versus as.numeric(1:4, "numeric")

2010-04-01 Thread Hervé Pagès
John Chambers wrote: The point I was making was that as() is not just a synonym for selecting a method from coerce() by the usual inheritance rules. I don't believe it should be, and the documentation emphasizes that inheritance is not used in the ordinary way. I got this. If you look carefu

Re: [Rd] as(1:4, "numeric") versus as.numeric(1:4, "numeric")

2010-04-01 Thread John Chambers
The problem that you have exposed is that if one uses the *standard* form of selectMethod() on function "coerce", this could corrupt the intended set of methods used by as(). Of course, no one was expected to do this, but it's not caught or warned (as opposed to a direct call to coerce(), whic