Re: [Rd] Names of a data set in a package

2011-04-05 Thread Gabor Grothendieck
2011/4/5 Göran Broström g...@stat.umu.se: 5 apr 2011 kl. 18.25 skrev Gabor Grothendieck: 2011/4/5 Göran Broström g...@stat.umu.se: For some reason I want to let one data set in a package be known under two different names.  Is that possible, and if so, how? I do not want to have two copies

Re: [Rd] Rtools questions

2011-04-05 Thread Gabor Grothendieck
On Tue, Apr 5, 2011 at 7:51 PM, Henrik Bengtsson h...@biostat.ucsf.edu wrote: On Tue, Apr 5, 2011 at 3:44 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 11-04-05 6:22 PM, Spencer Graves wrote: Hello:        1.  How can I tell when the development version of Rtools has changed? I

Re: [Rd] Rtools questions

2011-04-05 Thread Gabor Grothendieck
On Tue, Apr 5, 2011 at 8:58 PM, Spencer Graves spencer.gra...@prodsyse.com wrote: On 4/5/2011 5:01 PM, Gabor Grothendieck wrote: On Tue, Apr 5, 2011 at 7:51 PM, Henrik Bengtssonh...@biostat.ucsf.edu  wrote: On Tue, Apr 5, 2011 at 3:44 PM, Duncan Murdochmurdoch.dun...@gmail.com  wrote

Re: [Rd] Rtools and MinGW

2011-04-04 Thread Gabor Grothendieck
On Sun, Apr 3, 2011 at 3:36 PM, Thomas Mang thomasmang...@googlemail.com wrote: Hi, I have R version 2.8.1 and Rtools 28 installed (as you might guess, set up years ago). In Rtools the MinGW GCC 4.2 compiler toolset is included. For my regular C/C++ programs I have also installed,

Re: [Rd] Detecting bad lexical scoping

2011-03-17 Thread Gabor Grothendieck
On Wed, Mar 16, 2011 at 4:14 PM, Ryan King c.ryan.k...@gmail.com wrote: I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code.  The problem was an undefined variable inside of a function. Unfortunately, R

Re: [Rd] Create an environment and assign objects to it in one go?

2011-03-10 Thread Gabor Grothendieck
On 3/10/11, Henrik Bengtsson h...@biostat.ucsf.edu wrote: Hi, I've just created: newEnvEval - function(..., hash=FALSE, parent=parent.frame(), size=29L) { envir - new.env(hash=hash, parent=parent, size=size); evalq(..., envir=envir); envir; } # newEnvEval() so that I can create an

Re: [Rd] system(wait = FALSE)

2011-02-24 Thread Gabor Grothendieck
On Thu, Feb 24, 2011 at 2:46 PM, Oliver Soong osoon...@gmail.com wrote: Sorry, I didn't know about r-wind...@r-project.org.  Is that a public mailing list like r-help?  It's not listed under http://www.r-project.org/mail.html. I was able to reproduce the issue under two other 32-bit Windows 7

Re: [Rd] system(wait = FALSE)

2011-02-24 Thread Gabor Grothendieck
On Thu, Feb 24, 2011 at 7:30 PM, Oliver Soong osoon...@gmail.com wrote: The targets are identical.  In fact, I located the exact shortcut listed as the start menu recent programs entry, and it's the same one used in the all programs entry (there's some Windows magic going on here that I don't

Re: [Rd] Demo and 00Index problems

2011-02-19 Thread Gabor Grothendieck
On Sat, Feb 19, 2011 at 9:57 PM, Ronald Barry rpba...@alaska.edu wrote: Greetings,  I am sure I'm missing the obvious, but my 00Index file in the demo subdirectory is not recognized by R CMD check (the demo runs fine, but I get a WARNING from R CMD check about a lack of demo/00Index file.

[Rd] ave reports warning when nothing is wrong

2011-02-15 Thread Gabor Grothendieck
ave reports a warning here: DF - data.frame(A = c(1, 2, 2), B = c(1, 1, 2), C = c(1, 2, 3)) with(DF, ave(C, A, B, FUN = min)) [1] 1 2 3 Warning message: In FUN(X[[4L]], ...) : no non-missing arguments to min; returning Inf In this case it can be avoided by using drop = TRUE which could only be

Re: [Rd] Request: Suggestions for good teaching packages, esp. with C code

2011-02-15 Thread Gabor Grothendieck
On Tue, Feb 15, 2011 at 1:04 PM, Paul Johnson pauljoh...@gmail.com wrote: Hello, I am looking for CRAN packages that don't teach bad habits.  Can I have suggestions? I don't mean the recommended packages that come with R, I mean the contributed ones.  I've been sampling a lot of examples

Re: [Rd] Request: Suggestions for good teaching packages, esp. with C code

2011-02-15 Thread Gabor Grothendieck
On Tue, Feb 15, 2011 at 4:48 PM, David Scott d.sc...@auckland.ac.nz wrote: On 16/02/2011 7:04 a.m., Paul Johnson wrote: Hello, I am looking for CRAN packages that don't teach bad habits.  Can I have suggestions? I don't mean the recommended packages that come with R, I mean the

Re: [Rd] Request: Suggestions for good teaching packages, esp. with C code

2011-02-15 Thread Gabor Grothendieck
On Tue, Feb 15, 2011 at 5:43 PM, ken.willi...@thomsonreuters.com wrote: On 2/15/11 4:35 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: I think the real good programming practice is to have a single point of exit at the bottom. I disagree, it can be extremely useful to exit early from

Re: [Rd] aggregate(as.formula(some formula), data, function) error when called from in a function

2011-01-26 Thread Gabor Grothendieck
On Wed, Jan 26, 2011 at 2:04 PM, Paul Bailey pdbai...@umd.edu wrote: I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion I think my problem may also only occur when the left hand side of the formula is

Re: [Rd] + operator on characters revisited

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 2:15 PM, Davor Cubranic cubra...@stat.ubc.ca wrote: On 2011-01-23, at 4:34 AM, Gabor Grothendieck wrote: On Sun, Jan 23, 2011 at 6:56 AM, Vitalie S. spinuvit.l...@gmail.com wrote: Gabor Grothendieck ggrothendi...@gmail.com writes: Also the gsubfn supports quasi perl

Re: [Rd] + operator on characters revisited

2011-01-23 Thread Gabor Grothendieck
On Sun, Jan 23, 2011 at 6:56 AM, Vitalie S. spinuvit.l...@gmail.com wrote: Gabor Grothendieck ggrothendi...@gmail.com writes: On Sat, Jan 22, 2011 at 3:08 PM, Vitalie S. spinuvit.l...@gmail.com wrote: Hello everyone! Motivated by the recent post on SO http://stackoverflow.com/questions

Re: [Rd] + operator on characters revisited

2011-01-22 Thread Gabor Grothendieck
On Sat, Jan 22, 2011 at 3:08 PM, Vitalie S. spinuvit.l...@gmail.com wrote: Hello everyone! Motivated by the recent post on SO http://stackoverflow.com/questions/4730551/making-a-string-concatenation-operator-in-r I wonder what is the current state of argument on making + to concatenate

Re: [Rd] scoping/non-standard evaluation issue

2011-01-04 Thread Gabor Grothendieck
On Tue, Jan 4, 2011 at 4:35 PM, John Fox j...@mcmaster.ca wrote: Dear r-devel list members, On a couple of occasions I've encountered the issue illustrated by the following examples: - snip --- mod.1 - lm(Employed ~ GNP.deflator + GNP + Unemployed + +         Armed.Forces

Re: [Rd] RFC: sapply() limitation from vector to matrix, but not further

2010-12-27 Thread Gabor Grothendieck
On Wed, Dec 1, 2010 at 3:39 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: My proposal -- implemented and make check tested -- is to add an optional argument  'ARRAY' which allows sapply(v, myF, y = 2*(1:5), ARRAY=TRUE) It would reduce the proliferation of arguments if the simplify=

Re: [Rd] LazyLoad changes the class of objects

2010-12-24 Thread Gabor Grothendieck
On Wed, Oct 17, 2007 at 8:59 AM, Luke Tierney l...@stat.uiowa.edu wrote: Yes, attributes are not preserved, though why that should matter given the frequent strong recommendations in this list against using attributes on environments or other reference objects is beyond me. More importantly,

Re: [Rd] Rcmd SHLIB error

2010-12-19 Thread Gabor Grothendieck
On Sun, Dec 19, 2010 at 6:39 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 19/12/2010 6:06 AM, Gabor Grothendieck wrote: On Sat, Dec 18, 2010 at 8:23 PM, Dominick Samperidjsamp...@gmail.com  wrote: On Sat, Dec 18, 2010 at 5:24 PM, Gabor Grothendieck ggrothendi...@gmail.com  wrote

Re: [Rd] Rcmd SHLIB error

2010-12-19 Thread Gabor Grothendieck
On Sun, Dec 19, 2010 at 9:07 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 19/12/2010 7:01 AM, Gabor Grothendieck wrote: On Sun, Dec 19, 2010 at 6:39 AM, Duncan Murdoch murdoch.dun...@gmail.com  wrote: On 19/12/2010 6:06 AM, Gabor Grothendieck wrote: On Sat, Dec 18, 2010 at 8:23 PM

Re: [Rd] Rcmd SHLIB error

2010-12-19 Thread Gabor Grothendieck
On Sun, Dec 19, 2010 at 10:31 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 19/12/2010 10:04 AM, Gabor Grothendieck wrote: On Sun, Dec 19, 2010 at 9:07 AM, Duncan Murdoch murdoch.dun...@gmail.com  wrote: On 19/12/2010 7:01 AM, Gabor Grothendieck wrote: On Sun, Dec 19, 2010 at 6:39

[Rd] Rcmd SHLIB error

2010-12-18 Thread Gabor Grothendieck
I am getting this error message when I try to run Rcmd SHLIB myprog.c. There appears to be a missing / between etc and i386 in the path. I am on Windows Vista and am using R version 2.12.1 Patched (2010-12-16 r53864) and just downloaded Rtools 2.12 today. Is this a bug in R? How can I resolve

[Rd] Surprising behavior of letters[c(NA, NA)]

2010-12-17 Thread Gabor Grothendieck
Consider this: letters[c(2, 3)] [1] b c letters[c(2, NA)] [1] b NA letters[c(NA, 3)] [1] NA c letters[c(NA, NA)] [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA The result is a 2-vector in each case until we get to c(NA, NA) and then it unexpectedly

Re: [Rd] Surprising behavior of letters[c(NA, NA)]

2010-12-17 Thread Gabor Grothendieck
On Fri, Dec 17, 2010 at 9:58 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 17/12/2010 9:32 AM, Gabor Grothendieck wrote: Consider this:  letters[c(2, 3)] [1] b c  letters[c(2, NA)] [1] b NA  letters[c(NA, 3)] [1] NA  c  letters[c(NA, NA)]  [1] NA NA NA NA NA NA NA NA NA NA

Re: [Rd] R - Haskell

2010-12-11 Thread Gabor Grothendieck
On Sat, Dec 11, 2010 at 9:04 PM, Jason E. Aten j.e.a...@gmail.com wrote: I'd like to develop, if there is not one already, an interface between R code and Haskell code, to allow R code to call Haskell (compiled) code, and vice-versa.  But in the interest of not reinventing the wheel, does

[Rd] directory structure of R 2.12.0 distribution

2010-12-08 Thread Gabor Grothendieck
I am just revising my batch files which call R and have a question regarding the directory structure of the R distribution in R 2.12.0. Prior to R 2.12.0 the R executables were in R_HOME\bin but now are in R_HOME\bin\i386 on my machine. I assume that there is a different subdirectory of bin on

Re: [Rd] directory structure of R 2.12.0 distribution

2010-12-08 Thread Gabor Grothendieck
On Wed, Dec 8, 2010 at 11:43 AM, Kevin R. Coombes kevin.r.coom...@gmail.com wrote: Hi, On my 64-bit machine, there are two subdirectories:    i386    x64 I usually want to use the 64-bit executable.  However, some packages have not yet been compiled for a 64-bit machine, so for those I need

Re: [Rd] how to store package options over sessions?

2010-11-22 Thread Gabor Grothendieck
On Sat, Nov 20, 2010 at 11:12 AM, Mark Heckmann mark.heckm...@gmx.de wrote: Hi, I posted this a week ago on r-help but did not get an answer. So I hope that someone here can help me: I want to define some options for my package the user may change. It would be convenient if the changes could

Re: [Rd] Evaluation puzzle

2010-11-11 Thread Gabor Grothendieck
On Thu, Nov 11, 2010 at 3:08 PM, Terry Therneau thern...@mayo.edu wrote: The survexp function can fail when called from another function.  The why of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test - function(formula,

Re: [Rd] Evaluation puzzle

2010-11-11 Thread Gabor Grothendieck
On Thu, Nov 11, 2010 at 5:27 PM, Terry Therneau thern...@mayo.edu wrote: Gabor wrote:  At the above statement you have lost the environment of your formula.    m$formula - tform Replace this with: m$formula - as.formula(tform, environment(formula)) --  No, I have not

Re: [Rd] stats, pics etc on CRAN

2010-11-01 Thread Gabor Grothendieck
On Mon, Nov 1, 2010 at 3:20 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: Does anyone have some nice ways of showing what's on CRAN? A time-series of the number of packages? A clustered graph of packages by keyword? I'm just after a more impressive way of saying there's 2600

Re: [Rd] Rbuildignore and mercurial

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 10:43 PM, Terry Therneau thern...@mayo.edu wrote:  I've changed to Mercurial for my working copies of survival for a number or resons not relevant to this post.  When I do R CMD check, I get some warnings about certain files in the .hg directory with odd names.  I've

Re: [Rd] reliability of R-Forge? (moving to r-Devel)

2010-08-26 Thread Gabor Grothendieck
On Thu, Aug 26, 2010 at 4:52 AM, Spencer Graves spencer.gra...@structuremonitoring.com wrote:  Hello:      Can anyone comment on plans for R-Forge?  Please see thread below.      Ramsay, Hooker and I would like to release a new version of fda to CRAN.  We committed changes for it last

[Rd] nls.control(warnOnly = TRUE) gives error rather than warning

2010-08-22 Thread Gabor Grothendieck
In ?nls.control it says: warnOnly a logical specifying whether nls() should return instead of signalling an error in the case of termination before convergence. Termination before convergence happens upon completion of maxiter iterations, in the case of a singular gradient, and in the case that

Re: [Rd] No RTFM?

2010-08-21 Thread Gabor Grothendieck
On Sat, Aug 21, 2010 at 6:47 PM, Paul Johnson pauljoh...@gmail.com wrote: On Sat, Aug 21, 2010 at 11:04 AM, Hadley Wickham had...@rice.edu wrote: previous suggestion by a regular contributor.  I still think a better response is not to escalate:  Either ignore the post or say something like, I

Re: [Rd] No RTFM?

2010-08-21 Thread Gabor Grothendieck
On Sat, Aug 21, 2010 at 8:59 PM, Hadley Wickham had...@rice.edu wrote: Regarding length, the portion at the end of every r-help message (but this does not appear at the end of r-devel messages or the messages of other lists concerning R):   provide commented, minimal, self-contained,

Re: [Rd] No RTFM?

2010-08-20 Thread Gabor Grothendieck
On Fri, Aug 20, 2010 at 2:12 PM, Paul Johnson pauljoh...@gmail.com wrote: On Thu, Aug 19, 2010 at 7:08 PM, Spencer Graves spencer.gra...@structuremonitoring.com wrote:  What do you think about adding a No RTFM policy to the R mailing lists? Per, http://en.wikipedia.org/wiki/RTFM: I think

Re: [Rd] c.POSIXct

2010-08-19 Thread Gabor Grothendieck
On Thu, Aug 19, 2010 at 10:16 AM, Paul Gilbert pgilb...@bank-banque-canada.ca wrote: I used to get caught by this c() behaviour often, but now I do expect it to drop attributes. I think it would break many things if you change it, and force people to write different code when they really do

Re: [Rd] Does anyone use Sweave (RweaveLatex) option expand=FALSE?

2010-08-19 Thread Gabor Grothendieck
On Thu, Aug 19, 2010 at 6:21 PM, Kevin Coombes kevin.r.coom...@gmail.com wrote: I picked the example from segmenting chromosomes for a reason.  I have a fair chunk of code that deals with not quite exceeding the amount of RAM available in the machine sitting on my desktop.  If I use functions,

Re: [Rd] c.POSIXct

2010-08-18 Thread Gabor Grothendieck
No one answered this so I submitted it to the bugs system and there I got the response that it is documented behavior; however, whether its documented or not is hardly the point -- its undesirable that tzone is lost when using c. On Thu, Aug 12, 2010 at 11:33 AM, Gabor Grothendieck ggrothendi

Re: [Rd] c.POSIXct

2010-08-18 Thread Gabor Grothendieck
On Wed, Aug 18, 2010 at 10:34 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Aug 18, 2010, at 6:23 PM, Gabor Grothendieck wrote: No one answered this so I submitted it to the bugs system and there I got the response that it is documented behavior; however, whether its documented

[Rd] c.POSIXct

2010-08-12 Thread Gabor Grothendieck
Currently if x1 and x2 are POSIXct then c(x1, x2) will not have a tzone attribute even if x1 or x2 or both do but it should. This could be fixed with the following c.POSIXct: c.POSIXct - function (..., recursive = FALSE) { tzones - lapply(list(...), attr, which = tzone) lengths -

Re: [Rd] accessing tcl variables within R and tcl

2010-08-12 Thread Gabor Grothendieck
On Thu, Aug 12, 2010 at 2:14 PM, Adrian Waddell m...@waddell.ch wrote: Dear R users, I have some troubles with dealing with tclObj objects. I try to explain it with a toy example: Say I define the following tcl procedure which just prints out each list element library(tcltk) .Tcl('proc

Re: [Rd] Assignment of individual values to data frame columns: intentional or unintentional behavior?

2010-08-05 Thread Gabor Grothendieck
On Thu, Aug 5, 2010 at 12:24 PM, Ulrike Grömping groemp...@bht-berlin.de wrote: Dear developeRs, I have just discovered a strange feature when assigning some values to columns of a data frame: The column is matched by partial matching (as documented), but when assigning a value, a new column

Re: [Rd] broken link to new features in R-devel: no NEWS file

2010-07-20 Thread Gabor Grothendieck
On Tue, Jul 20, 2010 at 10:20 PM, mark.braving...@csiro.au wrote: Hi The link from CRAN to new features in R-devel hasn't been working for a few days. Specifically, there is no NEWS file in https://svn.r-project.org/R/trunk/, though there is an ONEWS. The link is in the Source code for

Re: [Rd] Creating an environment with attributes in a package

2010-07-16 Thread Gabor Grothendieck
On Fri, Jul 16, 2010 at 8:08 AM, Jon Clayden jon.clay...@gmail.com wrote: Dear all, I am trying to create an environment object with additional attributes, viz. Foo - structure(new.env(), name=Foo) Doing this in a standard session works fine: I get the environment with attr(,name) set as

Re: [Rd] Creating an environment with attributes in a package

2010-07-16 Thread Gabor Grothendieck
On Fri, Jul 16, 2010 at 8:15 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Fri, Jul 16, 2010 at 8:08 AM, Jon Clayden jon.clay...@gmail.com wrote: Dear all, I am trying to create an environment object with additional attributes, viz. Foo - structure(new.env(), name=Foo) Doing

Re: [Rd] Strange R object

2010-07-09 Thread Gabor Grothendieck
On Fri, Jul 9, 2010 at 5:09 AM, Peter Dalgaard pda...@gmail.com wrote: Gabor Grothendieck wrote: I have *** attached *** an RData file containing an R object that is acting strangely. Try this in a fresh workspace. Do not load zoo or any other package. We load the object, zz2, from

Re: [Rd] pass-by-reference

2010-07-08 Thread Gabor Grothendieck
On Thu, Jul 8, 2010 at 12:52 AM, Paul Bailey pdbai...@umd.edu wrote: I'm working with a large object that I want to modify slightly in a function. Pass-by-reference would make a lot of sense, but I don't know how to do it. I've searched this archive and thought that I can do something like

[Rd] Strange R object

2010-07-08 Thread Gabor Grothendieck
I have *** attached *** an RData file containing an R object that is acting strangely. Try this in a fresh workspace. Do not load zoo or any other package. We load the object, zz2, from the attached RData file. It is just the number 1 with the class c(zooreg, zoo). Now create an S3 print

[Rd] kmeans

2010-07-02 Thread Gabor Grothendieck
In kmeans() in stats one gets an error message with the default clustering algorithm if centers = 1. Its often useful to calculate the sum of squares for 1 cluster, 2 clusters, etc. and this error complicates things since one has to treat 1 cluster as a special case. A second reason is that

Re: [Rd] Package development process?

2010-06-16 Thread Gabor Grothendieck
On Wed, Jun 16, 2010 at 12:20 AM, Spencer Graves spencer.gra...@structuremonitoring.com wrote: Hi, Gabor:      Thanks.  I added a row for Ruby and columns for Package manager and Collaborative development platform to the table of Selected Repositories in the Wikipedia entry for Software

[Rd] cut takes long time

2010-06-16 Thread Gabor Grothendieck
The following cut command takes nearly 10 seconds on my machine even though the length of input vector is only 6. I am running on Windows Vista with C2D BLAS using R 2.11.1. Using the default BLAS and either R 2.10.1 or R version 2.12.0 Under development (unstable) (2010-05-31 r52164) also gives

Re: [Rd] Package development process?

2010-06-15 Thread Gabor Grothendieck
On Tue, Jun 15, 2010 at 9:45 PM, Spencer Graves spencer.gra...@structuremonitoring.com wrote: Hello, All:      What thoughts might you have on The R Software Package Development Process?      I'm looking for ideas, materials, references, and / or collaborators for an article on this topic

Re: [Rd] S4 classes and S3 generic functions

2010-06-13 Thread Gabor Grothendieck
On Sun, Jun 13, 2010 at 6:58 PM, John Chambers j...@r-project.org wrote: A general goal for the next version of R is to make S4 and S3 play better together. As mentioned in a previous thread, one limitation has been that S3 generic functions, specifically the UseMethod() call, did not make

Re: [Rd] Extract/format/show for S4 objects

2010-06-09 Thread Gabor Grothendieck
Hibschman jhibsch...@gmail.com wrote: Gabor Grothendieck ggrothendi...@gmail.com writes: The yearqtr class already rounds off automatically to avoid floating point effects and handles #1 and #2. The main use for all this was so I could use quarters as index columns with data.table, which demands

Re: [Rd] Extract/format/show for S4 objects

2010-06-08 Thread Gabor Grothendieck
The yearqtr class already rounds off automatically to avoid floating point effects and handles #1 and #2. On the other hand if you are just interested in playing around with S4 for its own sake review the source code of the mondate package as an example of an S4 based date package. On Tue, Jun

Re: [Rd] #Rscript error on Windows 7 operating system

2010-06-02 Thread Gabor Grothendieck
The message about XP you are referring to is a warning and not an error. Evidently, you are running an old version of #Rscript.bat from the batchfiles distribution. Try using the most recent version. The batchfiles home page is at: http://batchfiles.googlecode.com That should at least eliminate

[Rd] Bug with ..0

2010-05-30 Thread Gabor Grothendieck
This function call returns 3 but should return 32. ..0 has no special significance in R as far I know yet it seems to be acting as if it were ..1 . Comments? ff - function(..0, ...) ..0 ff(32, 3) [1] 3 R.version.string [1] R version 2.11.0 Patched (2010-04-26 r51822) win.version() [1]

Re: [Rd] Bug with ..0

2010-05-30 Thread Gabor Grothendieck
Note that ?Reserved lists ..1, ..2, to ..9 but does not list ..0. Also, why is it reserved? What is the future intended use? On Sun, May 30, 2010 at 3:40 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 30/05/2010 3:13 PM, Gabor Grothendieck wrote: This function call returns 3

Re: [Rd] Bug with ..0

2010-05-30 Thread Gabor Grothendieck
On Sun, May 30, 2010 at 4:31 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: As far as I know, there is none. It is reserved simply because it follows the pattern of ..n. It would not be hard to make ..0 specially unreserved, but what would be the point? Here is the case I had in mind. The

Re: [Rd] SVN vs DVCS

2010-05-26 Thread Gabor Grothendieck
Note that one can also use any of the dvcs systems without actually moving from svn by using the dvcs (or associated extension/addon) as an svn client or by using it on an svn checkout. On Wed, May 26, 2010 at 5:44 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: Felix Andrews

Re: [Rd] segfault on 2.11.0 with large POSIXct vector using as.character

2010-05-26 Thread Gabor Grothendieck
On my Vista system there is no seg fault: invisible(as.character(Sys.time()+1:5e5)) win.version() [1] Windows Vista (build 6002) Service Pack 2 R.version.string [1] R version 2.11.0 Patched (2010-04-26 r51822) On Wed, May 26, 2010 at 7:29 AM, Jeff Ryan jeff.a.r...@gmail.com wrote: Running

Re: [Rd] SVN vs DVCS

2010-05-26 Thread Gabor Grothendieck
On Wed, May 26, 2010 at 11:38 AM, Hadley Wickham had...@rice.edu wrote:  It's a real shame that this unique component of R-forge is so closely connected to the tools that many other sites provide. R-Forge does have the capability of mirroring an external subversion repository according to

Re: [Rd] pretty.Date(): new halfmonth time step

2010-05-20 Thread Gabor Grothendieck
Note that in the zoo package that as.Date.yearmon has a frac= argument, e.g. library(zoo) ym - as.yearmon(2010-01) as.Date(ym, frac = 0.5) [1] 2010-01-16 On Wed, May 19, 2010 at 9:56 PM, Daniel Murphy chiefmur...@gmail.com wrote: Much better to implement directly what this is trying to do:

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 jeff.a.r...@gmail.com wrote: This isn't like a local variable though, since any function above the

Re: [Rd] Generate NA of specified type

2010-05-05 Thread Gabor Grothendieck
Try this: replace(x[1][], TRUE, NA) or replace(x[[1]][], TRUE, NA) depending on what you want. On Wed, May 5, 2010 at 11:57 AM, Hadley Wickham had...@rice.edu wrote: Hi all, Is there an existing function that provides the correct type of missing value for a given vector? e.g. NAof(1:3)

Re: [Rd] Most recent R manuals [Was: Likely disruption to R-devel builds on Windows]

2010-04-30 Thread Gabor Grothendieck
Some easy way to find out what has changed would be desirable here. On Fri, Apr 30, 2010 at 9:03 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Apr 30, 2010, at 4:20 AM, Prof Brian Ripley wrote: We are planning to phase in some major changes to the R build process on Windows

Re: [Rd] Most recent R manuals [Was: Likely disruption to R-devel builds on Windows]

2010-04-30 Thread Gabor Grothendieck
On Fri, Apr 30, 2010 at 10:39 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 30/04/2010 10:22 AM, hadley wickham wrote: Maybe Duncan could apply the same script that's being used for RNEWS to the manuals?  An RSS feed of changes to the manuals would be really useful. My script is very

Re: [Rd] Most recent R manuals [Was: Likely disruption to R-devel builds on Windows]

2010-04-30 Thread Gabor Grothendieck
On Fri, Apr 30, 2010 at 11:01 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 30/04/2010 10:48 AM, Gabor Grothendieck wrote: On Fri, Apr 30, 2010 at 10:39 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 30/04/2010 10:22 AM, hadley wickham wrote: Maybe Duncan could apply the same

Re: [Rd] Bugs? when dealing with contrasts

2010-04-22 Thread Gabor Grothendieck
On Thu, Apr 22, 2010 at 2:32 AM, Peter Dalgaard pda...@gmail.com wrote: Gabor Grothendieck wrote: On Wed, Apr 21, 2010 at 4:26 PM, Peter Dalgaard pda...@gmail.com wrote: ... I.e., that R reverts to using indicator variables when the intercept is absent. Is there any nice way of getting

[Rd] Bugs? when dealing with contrasts

2010-04-21 Thread Gabor Grothendieck
R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Re: [Rd] Bugs? when dealing with contrasts

2010-04-21 Thread Gabor Grothendieck
On Wed, Apr 21, 2010 at 4:26 PM, Peter Dalgaard pda...@gmail.com wrote: As for case #1, the rules are tricky in cases where interactions are present without main effects, but AFAICS, what you observe is essentially the same effect as model.matrix(~fac-1, contrasts=list(fac=contr.sum))   fac1

Re: [Rd] Bugs? when dealing with contrasts

2010-04-21 Thread Gabor Grothendieck
On Wed, Apr 21, 2010 at 11:38 PM, Berwin A Turlach ber...@maths.uwa.edu.au wrote: # But I was expecting this since I am using contr.sum cbind(1, model.matrix(~ fac)[,2:3] * scores)      fac1 fac2 1  1   -2    0 2  1   -1    0 3  1    0    0 4  1    1    0 5  1    2    0 6  1    0   -2

[Rd] Additions to posting guide

2010-04-07 Thread Gabor Grothendieck
One user said he would have found it useful to have textConnection be described in the posting guide since he was having problems creating a self-contained post. I suggest the following section be added: How to post commented, minimal, self-contained, reproducible code

Re: [Rd] Additions to posting guide

2010-04-07 Thread Gabor Grothendieck
e-letter, who had suggested that something about textConnection be added, also suggested that warning against posting code that first wipes out all variables in the workspace. On Wed, Apr 7, 2010 at 7:31 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: One user said he would have found

Re: [Rd] Setting up TortoiseSVN and PuTTY on Windows for r-forge.r-project.org (Was: Re: Using SVN + SSH on windows)

2010-03-28 Thread Gabor Grothendieck
fine with windows and tortoise in my experience. Is your putty/ssh working? Can you access other machines with it? I do recall ssh can be a bit fussy. David Scott On 27.03.2010 18:31, Gabor Grothendieck wrote: s getting commits to R-Forge to work from Windows.  The entire system is really

Re: [Rd] Possible improvements/clarifications for R-forge (Was: Re: Using SVN + SSH on windows)

2010-03-28 Thread Gabor Grothendieck
I agree that the R-Forge system is solid once you have it going but its better if you are Linux based and less attractive if you are Windows based. In particular if the two problems I cited before (use of ssh and the delay) were addressed then together with the key feature of automatic builds that

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Gabor Grothendieck
I am using TortoiseSVN 1.6.7 on Vista and right clicking in Windows explorer and choosing TortoiseSVN | TortoiseSVN Settings | Network gives a blank dialog. In fact I don't think I have ever used the TortoiseSVN Network dialog at all yet I am able to use TortoiseSVN to send commits to

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Gabor Grothendieck
using a vanilla ssh (rather than putty) and that works fine all the time... Uwe Ligges On 27.03.2010 18:31, Gabor Grothendieck wrote: s getting commits to R-Forge to work from Windows.  The entire system is really geared to UNIX.  It took me a couple of days of trial and error (since you

Re: [Rd] Using SVN + SSH on windows

2010-03-27 Thread Gabor Grothendieck
these problems in part making the system more useful so I don't agree that this is mere complaining. On Sat, Mar 27, 2010 at 2:15 PM, Dirk Eddelbuettel e...@debian.org wrote: On 27 March 2010 at 13:50, Gabor Grothendieck wrote: | The worst part is the 20 minute delay which means that if here

Re: [Rd] r cmd check in r 2.11 accessing internet

2010-03-20 Thread Gabor Grothendieck
references rather than building the vignettes. Its possible that it was checking CRAN for a package not in my R 2.11 library -- does it do that? Thanks. 2010/3/20 Uwe Ligges lig...@statistik.tu-dortmund.de: On 20.03.2010 04:46, Gabor Grothendieck wrote: While performing an Rcmd check in R 2.11 (2010

[Rd] r cmd check in r 2.11 accessing internet

2010-03-19 Thread Gabor Grothendieck
While performing an Rcmd check in R 2.11 (2010-03-14 r51276) on Windows Vista I noticed it was trying to access the internet during this phase: * checking Rd cross-references Is that supposed to happen? __ R-devel@r-project.org mailing list

[Rd] tcltk and R

2010-03-15 Thread Gabor Grothendieck
I have had some comments on sqldf regarding its dependence on tcltk such as the second last sentence on this blog post:

Re: [Rd] Suggestion to add crantastic to resources section on posting guide

2010-03-05 Thread Gabor Grothendieck
I don't think we should be expanding the posting guide. Its already so long that no one reads it. We should be thinking of ways to cut it down to a smaller size instead. On Fri, Mar 5, 2010 at 5:52 AM, Matthew Dowle mdo...@mdowle.plus.com wrote: Under the further resources section I'd like to

Re: [Rd] proto and baseenv()

2010-02-26 Thread Gabor Grothendieck
On Fri, Feb 26, 2010 at 12:41 AM, Peter Danenberg p...@roxygen.org wrote: Also other object systems which are alternatives to proto seem less relevant than basic scoping and free variable lookup in functions. Sorry, but that seems absurd; object systems are less relevant to each other than

Re: [Rd] proto and baseenv()

2010-02-26 Thread Gabor Grothendieck
On Fri, Feb 26, 2010 at 9:01 AM, Ben mi...@emerose.org wrote: In end it seems that your real beef is with R so perhaps you should be using a different language. In my case you may be right.  I do think there are a million things wrong with R.  For instance, I was looking for a package that

Re: [Rd] proto and baseenv()

2010-02-26 Thread Gabor Grothendieck
since I'm new to proto, but I don't see why you're dismissing this example as user error. -- Ben Escoto - Original message - From: Gabor Grothendieck ggrothendi...@gmail.com To: Ben mi...@emerose.org Date: Fri, 26 Feb 2010 09:28:46 -0500 On Fri, Feb 26

Re: [Rd] proto and baseenv()

2010-02-26 Thread Gabor Grothendieck
Added one other comment below. On Fri, Feb 26, 2010 at 9:41 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Fri, Feb 26, 2010 at 8:46 PM, Ben mi...@emerose.org wrote: Maybe I'm still not getting something fundamental, but I didn't intend I think you are missing the R search path

Re: [Rd] proto and baseenv()

2010-02-25 Thread Gabor Grothendieck
That is how R works with free variables, e.g. z - 1 f - function() z f() # 1 so the current behavior seems consistent with the rest of R. Note that the example below could be done like this to avoid the error: z - 1 proto(baseenv(), a = z)$a [1] 1 On Thu, Feb 25, 2010 at 12:33 AM, Ben

Re: [Rd] proto and baseenv()

2010-02-25 Thread Gabor Grothendieck
On Thu, Feb 25, 2010 at 9:57 AM, hadley wickham h.wick...@gmail.com wrote: Presumably if I ask for p$a or p$b later, it's because I'm interesting in the value of p$a or p$b that I specifically put inside that environment.  Otherwise I would just ask for a or b.  If I'm asking for p$b it the

Re: [Rd] proto and baseenv()

2010-02-25 Thread Gabor Grothendieck
On Thu, Feb 25, 2010 at 9:23 PM, Peter Danenberg p...@roxygen.org wrote: I think you are looking for a different object model than proto offers.  There aren't many languages that offer the prototype object model. Yes, your probably right---I don't have much experience using the prototype

Re: [Rd] proto and baseenv()

2010-02-25 Thread Gabor Grothendieck
On Thu, Feb 25, 2010 at 11:16 PM, Peter Danenberg p...@roxygen.org wrote: Your preference is inconsistent with how the rest of R works and is inflexible since everything inherits from Object. Really? Here are a couple of counterexamples in S3 and S4 objects:   z - 1     ## S4  

Re: [Rd] Best style to organize code, namespaces

2010-02-23 Thread Gabor Grothendieck
(e) would debug all functions directly in environment e. On Tue, Feb 23, 2010 at 5:42 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 22/02/2010 10:15 PM, Gabor Grothendieck wrote: As you mention ease of debugging basically precludes subfunctions so style 1 is left. I think you are also

Re: [Rd] Best style to organize code, namespaces

2010-02-22 Thread Gabor Grothendieck
As you mention ease of debugging basically precludes subfunctions so style 1 is left. Functions can be nested in environments rather than in other functions and this will allow debugging to still occur. The proto package which makes it particularly convenient to nest functions in environments

[Rd] Problem with ?Syntax

2010-02-20 Thread Gabor Grothendieck
In ?Syntax [ is given as higher priority than $ but BOD$demand[3] seems to be the same as (BOD$demand)[3] contrary to [ being higher priority. BOD$demand[3] [1] 19 (BOD$demand)[3] [1] 19 What is the rule being used here? __ R-devel@r-project.org

Re: [Rd] Problem with ?Syntax

2010-02-20 Thread Gabor Grothendieck
AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: In ?Syntax [ is given as higher priority than $ but BOD$demand[3] seems to be the same as (BOD$demand)[3] contrary to [ being higher priority. BOD$demand[3] [1] 19 (BOD$demand)[3] [1] 19 What is the rule being used here?  I think its

Re: [Rd] Inconsistency in as.data.frame.table for stringsAsFactors

2010-01-25 Thread Gabor Grothendieck
On Mon, Jan 25, 2010 at 10:36 AM, Terry Therneau thern...@mayo.edu wrote: Kudos to Peter for actually answering the question of why the inconsistency was there.  It might be well to add a bit to the documentation.  As to the larger discussion of global defaults let me offer two opinions:  

<    1   2   3   4   5   6   7   8   9   10   >