Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Hervé Pagès
On 05/01/2013 07:20 PM, Duncan Murdoch wrote: On 13-05-01 4:08 PM, Tim Triche, Jr. wrote: What harm comes of having the code be cut-and-paste-able? I do not mean to be contrary but a downside to applying the patch seems to be lacking. Perhaps I am missing something obvious and if so I beg your

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Duncan Murdoch
On 13-05-01 4:08 PM, Tim Triche, Jr. wrote: What harm comes of having the code be cut-and-paste-able? I do not mean to be contrary but a downside to applying the patch seems to be lacking. Perhaps I am missing something obvious and if so I beg your pardon for wasting your time. I think you are

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Hervé Pagès
On 05/01/2013 12:19 PM, Duncan Murdoch wrote: On 01/05/2013 1:34 PM, Tim Triche, Jr. wrote: +1 to having runnable code emitted It does emit runnable code, which is why Herve's complaint was nonsense. It doesn't emit code of which every substring is runnable. Perdon me, but I was not of cour

Re: [Rd] Windows, format.POSIXct and character encodings

2013-05-01 Thread Simon Urbanek
On May 1, 2013, at 5:33 PM, Simon Urbanek wrote: > > On May 1, 2013, at 10:06 AM, Hadley Wickham wrote: > >> Hi all, >> >> In what encoding does format.POSIXct return its output? It doesn't >> seem to be utf-8: >> >> Sys.setlocale("LC_ALL", "Japanese_Japan.932") >> >> times <- c("1970-01-01

Re: [Rd] Windows, format.POSIXct and character encodings

2013-05-01 Thread Simon Urbanek
On May 1, 2013, at 10:06 AM, Hadley Wickham wrote: > Hi all, > > In what encoding does format.POSIXct return its output? It doesn't > seem to be utf-8: > > Sys.setlocale("LC_ALL", "Japanese_Japan.932") > > times <- c("1970-01-01 01:00:00 UTC", "1970-02-02 22:00:00 UTC") > ampm <- format(as.POS

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Tim Triche, Jr.
What harm comes of having the code be cut-and-paste-able? I do not mean to be contrary but a downside to applying the patch seems to be lacking. Perhaps I am missing something obvious and if so I beg your pardon for wasting your time. Thanks, --t On Wed, May 1, 2013 at 12:19 PM, Duncan Murdoc

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Joris Meys
+1 for "} else {" . It might seem a detail, but I agree wholeheartedly that this would make teaching R easier. Btw, thank you Paul for the link to your coding style document. It was a nice read. Cheers Joris On Wed, May 1, 2013 at 9:19 PM, Duncan Murdoch wrote: > On 01/05/2013 1:34 PM, Tim Tri

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Duncan Murdoch
On 01/05/2013 1:34 PM, Tim Triche, Jr. wrote: +1 to having runnable code emitted It does emit runnable code, which is why Herve's complaint was nonsense. It doesn't emit code of which every substring is runnable. Duncan Murdoch patch seems to work nicely, hopefully R-core will agree to a

[Rd] objects with tsp attribute but no class

2013-05-01 Thread William Dunlap
What is the intended difference between objects of class "ts", which must have an attribute called "tsp", and objects with that attribute but not that class? Calling time series oriented functions like time() or window() on vectors of numbers produce the classless objects with the tsp attribute.

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Tim Triche, Jr.
+1 to having runnable code emitted patch seems to work nicely, hopefully R-core will agree to apply it to HEAD On Wed, May 1, 2013 at 9:45 AM, Paul Johnson wrote: > Whoa. > > Don't let my valuable suggestion get lost. > > I want "} else {". Yihue wants "} else {". And I have not heard anyb

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-01 Thread Paul Johnson
Whoa. Don't let my valuable suggestion get lost. I want "} else {". Yihue wants "} else {". And I have not heard anybody say they prefer the other way, unless you interpret Duncan's comment "that's nonsense" as a blanket defense of the status quo. But I don't think he meant that. This is a ma

Re: [Rd] trace with reference class

2013-05-01 Thread John Chambers
No intended change. The trace method was not updated when reference class generators became functions. Should be fixed now in r-devel and 3.0.0 patched (rev 62699). Thanks for the catch. John On 4/29/13 11:30 PM, Kohske Takahashi wrote: Hi The final line of the example in ?setRefClass ind

[Rd] Windows, format.POSIXct and character encodings

2013-05-01 Thread Hadley Wickham
Hi all, In what encoding does format.POSIXct return its output? It doesn't seem to be utf-8: Sys.setlocale("LC_ALL", "Japanese_Japan.932") times <- c("1970-01-01 01:00:00 UTC", "1970-02-02 22:00:00 UTC") ampm <- format(as.POSIXct(times), format = "%p") x <- gsub(">", "*", paste(ampm, collapse =

Re: [Rd] Comments in the DESCRIPTION file

2013-05-01 Thread Simon Urbanek
On May 1, 2013, at 6:01 AM, cgenolin wrote: > Hi all, > > Since R 3.0.0, the '#' does no longuer works for comments. > But as noticed above, comments can be introduce by 'anyWord:' or > 'myComment;' or 'toto:'. > > Since '#' can be used to name a field, we can also used '#:' or '###:' (or > eve

Re: [Rd] Comments in the DESCRIPTION file

2013-05-01 Thread cgenolin
Hi all, Since R 3.0.0, the '#' does no longuer works for comments. But as noticed above, comments can be introduce by 'anyWord:' or 'myComment;' or 'toto:'. Since '#' can be used to name a field, we can also used '#:' or '###:' (or even '%:' for LaTeX's fans). So '#:' is a new possible way for a