[Rd] Structure not deparsed correctly when printing calls

2013-03-20 Thread Hadley Wickham
z <- substitute(f(x), list(x = data.frame(y = 1))) z # f(list(y = 1)) str(z) # language f(structure(list(y = 1), .Names = "y", row.names = c(NA, -1L), class = "data.frame")) dput(z) # f(structure(list(y = 1), .Names = "y", row.names = c(NA, -1L), class = "data.frame")) Hadley -- Chief Scienti

[Rd] Typo-let in NEWS.Rd

2013-03-20 Thread R. Michael Weylandt
Applicable against current trunk and (I believe) R-3.0.0 branch. Michael Index: doc/NEWS.Rd === --- doc/NEWS.Rd (revision 62340) +++ doc/NEWS.Rd (working copy) @@ -183,7 +183,7 @@ through as bytes inputs invalid in the curren

[Rd] Character Encoding: Why are valid Windows-1252 characters encoded as invalid ISO-8859-1 characters?

2013-03-20 Thread Jason Wood
Something that looks like a bug to me - but as there may be a documented reason I have missed, I wanted to ask about it here first. Please let me know if this looks like something I should submit as a bug, if not, why this behavior is intended. Using RGui v2.15.3, 64bit, on a Windows 7 machine wi

Re: [Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread Hadley Wickham
On Wed, Mar 20, 2013 at 11:26 AM, peter dalgaard wrote: > > On Mar 20, 2013, at 16:59 , William Dunlap wrote: > >> Will you be doing the same for attribute names? > > Not at this point. It would be really nice to have consistent behaviour across argument names, attributes, lists and data frames,

Re: [Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread Milan Bouchet-Valat
Le mercredi 20 mars 2013 à 17:16 +0100, peter dalgaard a écrit : > On Mar 20, 2013, at 16:23 , Hadley Wickham wrote: > > > On Wed, Mar 20, 2013 at 7:28 AM, peter dalgaard > wrote: > >> Allowing partial matching on $-extraction has always been a source > of accidents. Recently, someone who shall r

[Rd] How to avoid using gridextra via Depends instead of Imports in a package ?

2013-03-20 Thread Karl Forner
Hello, I really need some insight on a problem we encountered using grid, lattice and gridExtra. I tried to reduce the problem, so the plot make no sense. we have a package: gridextrabug with: DESCRIPTION -- Package: gridextrabug Title: gridextrabug Version: 0.1 Author: toto Ma

Re: [Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread peter dalgaard
On Mar 20, 2013, at 16:59 , William Dunlap wrote: > Will you be doing the same for attribute names? Not at this point. > >> options(prompt=with(version, paste0(language,"-",major,".",minor,"> "))) > R-2.15.3> x <- structure(17, AnAttr="an attribute", Abcd="a b c d") > R-2.15.3> attr(x, "A")

Re: [Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread peter dalgaard
On Mar 20, 2013, at 16:23 , Hadley Wickham wrote: > On Wed, Mar 20, 2013 at 7:28 AM, peter dalgaard wrote: >> Allowing partial matching on $-extraction has always been a source of >> accidents. Recently, someone who shall remain nameless tried names(mydata) >> <- "d^2" followed by mydata$d^2.

Re: [Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread William Dunlap
Will you be doing the same for attribute names? > options(prompt=with(version, paste0(language,"-",major,".",minor,"> "))) R-2.15.3> x <- structure(17, AnAttr="an attribute", Abcd="a b c d") R-2.15.3> attr(x, "A") NULL R-2.15.3> attr(x, "An") [1] "an attribute" R-2.15.3> attr(x, "Ab"

Re: [Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread Hadley Wickham
On Wed, Mar 20, 2013 at 7:28 AM, peter dalgaard wrote: > Allowing partial matching on $-extraction has always been a source of > accidents. Recently, someone who shall remain nameless tried names(mydata) <- > "d^2" followed by mydata$d^2. > > As variables in a data frame are generally considered

[Rd] double in summary.c : isum

2013-03-20 Thread Matthew Dowle
Hi, Please consider the following : x = as.integer(2^30-1) [1] 1073741823 sum(c(rep(x, 1000), rep(-x,999))) [1] 1073741824 Tested on 2.15.2 and a recent R-devel (r62132). I'm wondering if s in isum could be LDOUBLE instead of double, like rsum, to fix this edge case? https://sv

[Rd] Deprecating partial matching in $.data.frame

2013-03-20 Thread peter dalgaard
Allowing partial matching on $-extraction has always been a source of accidents. Recently, someone who shall remain nameless tried names(mydata) <- "d^2" followed by mydata$d^2. As variables in a data frame are generally considered similar to variables in, say, the global environment, it seems

[Rd] fortune?

2013-03-20 Thread Patrick Burns
Brian Ripley: If things are not readily available in R it is always good to pause and reflect if there might be a good reason. In the R-help thread: How to get the t-stat for arima()? Pat -- Patrick Burns pbu...@pburns.seanet.com twitter: @burnsstat @portfolioprobe http://www.portfolioprobe.