p.dalgaard@biostat.ku.dk
2000-Apr-12 11:16 UTC
[Rd] For wishlist: sanity checks for subsets in lm, glm (PR#
Martyn Plummer <plummer@iarc.fr> writes:> On 12-Apr-00 Peter Dalgaard BSA wrote: > > Might be a good idea. Mind you, Splus 3.4 does exatly the same thing, > > and I'm a little worried that the uniqueness assumption might kill > > some bootstrapping applications: > > > > glm(y ~ x, data=test.data, subset=sample(seq(along=y),replace=T)) > > Splus 5.1 doesn't do this, because it preserves logical vectors in > data frames (but then perhaps comparisons with S4 or SPlus 5.x are > irrelevant?)They're sometimes relevant because they show what has been considered a bug in 3.x... The convert-to-factor conventions in 3.x (and R) are quite a bit of a pain in my opinion, but I'm afraid we're stuck with them at least for the near future (we couldn't make an API change as pervasive as that without bumping the major version number).> I knew there would be a good reason not to implement this. My feeling > is that high level modelling functions should protect the user as > much as possible. If you want more flexibility, you can always > program around it.Maybe, but... Getting people to program around S/R differences in their add-on packages haven't always been unproblematic. What would also catch your case would be to disallow factors as subset variables, and I can't think of any situation where subsetting with a factor would occur naturally. Does 5.1 allow subsetting with factors? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley
2000-Apr-12 12:54 UTC
[Rd] For wishlist: sanity checks for subsets in lm, glm (PR#
> From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> > Date: 12 Apr 2000 13:18:37 +0200 > > Martyn Plummer <plummer@iarc.fr> writes: > > > On 12-Apr-00 Peter Dalgaard BSA wrote: > > > Might be a good idea. Mind you, Splus 3.4 does exatly the same thing, > > > and I'm a little worried that the uniqueness assumption might kill > > > some bootstrapping applications: > > > > > > glm(y ~ x, data=test.data, subset=sample(seq(along=y),replace=T)) > > > > Splus 5.1 doesn't do this, because it preserves logical vectors in > > data frames (but then perhaps comparisons with S4 or SPlus 5.x are > > irrelevant?) > > They're sometimes relevant because they show what has been considered > a bug in 3.x... The convert-to-factor conventions in 3.x (and R) are > quite a bit of a pain in my opinion, but I'm afraid we're stuck with > them at least for the near future (we couldn't make an API change as > pervasive as that without bumping the major version number).I would argue for changing the behaviour of converting logicals for 1.1. It's a rare case, breaks almost nothing (as evidenced by the lack of problems with S-PLUS 5.x) and would be helpful. Character vars are another matter.> > I knew there would be a good reason not to implement this. My feeling > > is that high level modelling functions should protect the user as > > much as possible. If you want more flexibility, you can always > > program around it. > > Maybe, but... Getting people to program around S/R differences in > their add-on packages haven't always been unproblematic. > > What would also catch your case would be to disallow factors as subset > variables, and I can't think of any situation where subsetting with a > factor would occur naturally. Does 5.1 allow subsetting with factors?Yes, exactly as before. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
this time, it is REALLY a bug in the r code for the xgobi interface. on win95, at least in my configuration, xgobi(...,multi=TRUE) does not work. the temp files R creates are deleted before the xgobi process gets a chance to read the files. the culprit is on.exit(file.remove(tmpfiles)) on windows95, this deletes the files too early. changing it to if(!multi) { on.exit(file.remove(tmpfiles)) } solves the problem, but of course has the side effect of leaving the the temporary files on the machine. i do not understand enough of the mechanics of the system calls involved (yet) to do a full repair myself. my xgobi only questions to this list were cause by the fact thet multi=TRUE did not work, therefore i tried to use clone xgobi, which did not work either. it still does not work, despice the fatc that i think i read and followed the instructions carefully. erich -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Date: Thu, 13 Apr 2000 13:20:57 +0200 > From: Erich Neuwirth <erich.neuwirth@univie.ac.at> > Organization: University of Vienna > CC: r-devel@stat.math.ethz.ch > References: <200004121254.NAA22977@toucan.stats.ox.ac.uk> > Sender: owner-r-devel@stat.math.ethz.ch > Precedence: bulk > > this time, > it is REALLY a bug in the r code for the xgobi interface. > on win95, at least in my configuration, > xgobi(...,multi=TRUE) > does not work. > > the temp files R creates are deleted before > the xgobi process gets a chance to read the files. > > the culprit is > > on.exit(file.remove(tmpfiles)) > > on windows95, this deletes the files too early. > > changing it to > if(!multi) { on.exit(file.remove(tmpfiles)) } > > solves the problem, but of course has the side effect > of leaving the the temporary files on the machine. > i do not understand enough of the mechanics of the system calls > involved (yet) to do a full repair myself. > > > erichThe lack of synchronization is a fundamental limitation of this style of inter-process communication. One has to add crude hacks that are bound to fail under someones configuration in the absence of more coherent, formal and hence predictable, debuggable approaches are needed. We have two such approaches. Ross, Debby Swayne and I have, at different times, made modifications to xgobi to allow one to communicate with it via CORBA. Combined with the R-CORBA package, dynamic remote control and query of xgobi is quite simple. With this approach, the data is transferred directly and no messing with file systems, timing, etc is needed. The second approach is to allow XGobi be dynamically loaded into the R session as a shared library. I started about a week ago and most of that is functional (since it shares much of the functionality added via the CORBA server), but I won't get back to it until next week. One of the motivations for embedding XGobi into R (& S) is to look at event-loop integration, with the potential to lead to connections and/or (internal) threads. It would be good to know if there is any interest in having this embedded version for regular use (on Unix, since it would run in the R process). Otherwise it may not be worth the effort packaging it up that carefully. D. -- _______________________________________________________________ Duncan Temple Lang duncan@research.bell-labs.com Bell Labs, Lucent Technologies office: (908)582-3217 700 Mountain Avenue, Room 2C-259 fax: (908)582-3340 Murray Hill, NJ 07974-2070 http://cm.bell-labs.com/stat/duncan "Languages shape the way we think, and determine what we can think about." Benjamin Whorf -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi, Debby Swayne is working on a new version of xgobi (now called ggobi). I have been working with her and we have succeeded in compiling (and running) the preliminary version native on windows. No more emulation! all it needs is a com interface and it can communicate directly with R. We will be putting out some test versions soon, so comments (and help) would be appreciated. Nicholas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._