Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Berwin A Turlach
On Thu, 12 Mar 2009 21:26:15 +0100 Wacek Kusnierczyk wrote: > > YMMV, but when I read a passage like this in R documentation, I > > start to wonder why it is stated that > > names(x) <- c("a","b") > > is equivalent to > > *tmp* <- x > > x <- "names<-"('*tmp*', value=c("a","b")) > >

[Rd] analogy was: surprising behaviour of names<-

2009-03-12 Thread G. Jay Kerns
Dear Josh, > Your analogy may overstate the case a bit, Agreed. :-) > since R volunteers - while > providing a valuable service to the community - are not dealing with > matters of life and death. I see your point, and it is well taken. At the same time, in my view, statistics are like firear

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
G. Jay Kerns wrote: > Wacek Kusnierczyk wrote: > > > > I am prompted to imagine someone pointing out to the volunteers of the > International Red Cross - on the field of a natural disaster, no less > - that their uniforms are not an acceptably consistent shade of > pink... or that the screws on

Re: [Rd] Error compiling rgl package

2009-03-12 Thread Duncan Murdoch
Mohammad Nikseresht wrote: Hi, I receive the following error while I try to install rgl package: CC -xtarget=native64 -I/opt/R-2.8.1/lib/R/include -I/opt/SUNWhpc/HPC8.1/sun/include -DHAVE_PNG_H -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/sfw/include/freetype2 -I/usr/sfw/include

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Josh Ulrich
On Thu, Mar 12, 2009 at 3:24 PM, G. Jay Kerns wrote: > Wacek Kusnierczyk wrote: > > [snip] > >> as i explained a few months ago, i study r to find examples of bad >> design.  if anyone in the r core is interested in having the problems i >> report fixed, i'm happy to get involved in a discussion a

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Simon Urbanek wrote: > > On Mar 12, 2009, at 11:12 , Wacek Kusnierczyk wrote: > >> Simon Urbanek wrote: >>> >>> On Mar 11, 2009, at 10:52 , Simon Urbanek wrote: >>> Wacek, Peter gave you a full answer explaining it very well. If you really want to be able to trace each instance

[Rd] installed.packages and package info cache buglet (PR#13592)

2009-03-12 Thread Mark . Bravington
Looks like there is a buglet in 'installed.packages', around line 17: for (lib in lib.loc) { dest <- file.path(tempdir(), paste("libloc_", URLencode(lib,=20 TRUE), paste(fields, collapse =3D ","), ".rds", sep =3D "")) if (!noCache && file.exists(dest) && file.info(d

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Thu, 12 Mar 2009 15:21:50 +0100 > Wacek Kusnierczyk wrote: > > >> seems to suggest? is not the purpose of documentation to clearly, >> ideally beyond any doubt, specify what is to be specified? >> > > The R Language Definition manual is still a draft. :) >

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread G. Jay Kerns
Wacek Kusnierczyk wrote: [snip] > as i explained a few months ago, i study r to find examples of bad > design. if anyone in the r core is interested in having the problems i > report fixed, i'm happy to get involved in a discussion about the design > and implementation. if not, i'm happy with j

Re: [Rd] Compiling R-2.8.1 on Sparc Solaris 10: libRlapack.so: symbol __vlog_: referenced symbol not found

2009-03-12 Thread Mohammad Nikseresht
Problem was solved by adding "-lmvec" to FLIBS in Makeconf. __vlog_ is part of libmvec.so but apparently configure does not chose the proper option (-lmvec). -- Mohammad Nikseresht Software/System Engineer HPCVL, Carleton University mniks...@scs.carleton.ca 613-520-2600 x8758 Prof Brian Ripl

[Rd] Error compiling rgl package

2009-03-12 Thread Mohammad Nikseresht
Hi, I receive the following error while I try to install rgl package: CC -xtarget=native64 -I/opt/R-2.8.1/lib/R/include -I/opt/SUNWhpc/HPC8.1/sun/include -DHAVE_PNG_H -I/usr/include/libpng12 -DHAVE_FREETYPE -Iext/ftgl -I/usr/sfw/include/freetype2 -I/usr/sfw/include -Iext -I/opt/SUNWhpc/HPC8.1

[Rd] How does R handle interrupts?

2009-03-12 Thread Zhou Fang
Hi, I wonder if anyone can clear some things up for me to help me read the R source code. Suppose R receives SIGINT whilst processing R code... Where is that handled? What gets called? If you have R >source a script, where is that script stored? How does R keep track of where it is in the script

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Simon Urbanek
On Mar 12, 2009, at 11:12 , Wacek Kusnierczyk wrote: Simon Urbanek wrote: On Mar 11, 2009, at 10:52 , Simon Urbanek wrote: Wacek, Peter gave you a full answer explaining it very well. If you really want to be able to trace each instance yourself, you have to learn far more about R internal

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Berwin A Turlach
On Thu, 12 Mar 2009 15:21:50 +0100 Wacek Kusnierczyk wrote: [...] > >>> And the R Language manual (ignoring for the moment that it is a > >>> draft and all that), > >>> > >> since we must... > >> > >> > >>> clearly states that > >>> > >>> names(x) <- c("a","b") > >>> > >>> is e

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Simon Urbanek wrote: > > On Mar 11, 2009, at 10:52 , Simon Urbanek wrote: > >> Wacek, >> >> Peter gave you a full answer explaining it very well. If you really >> want to be able to trace each instance yourself, you have to learn >> far more about R internals than you apparently know (and Peter hin

Re: [Rd] E`<`

2009-03-12 Thread Wacek Kusnierczyk
l...@stat.uiowa.edu wrote: > Thanks to Stavros for the report. This should now be fixed in R-devel. indeed, though i find some of the error messages strange: (function(a=a) -a)() # Error in (function(a = a) -a)() : # element 1 is empty; # the part of the args list of '-' being

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Berwin A Turlach wrote: > > >> This is similar to the discussion what value i should have in the >> following C snippet: >> i = 0; >> i += i++; >> >> > > > in fact, your example is useless because the result here is clearly > specified by the semantic

Re: [Rd] E`<`

2009-03-12 Thread luke
Thanks to Stavros for the report. This should now be fixed in R-devel. luke On Wed, 11 Mar 2009, l...@stat.uiowa.edu wrote: Looks like an infinite recursion in R_isMissing, which I think may be turned into an infinite loop if the C compiler is doing tail call optimization. I need to understa

Re: [Rd] r-devel tarball build failure on windows

2009-03-12 Thread Prof Brian Ripley
I realized that there was a different point tacked on here that has not been answered: On Tue, 10 Mar 2009, Hiroyuki Kawakatsu wrote: [...] By the way, I noticed that -make all recommended- still builds the CHM help files for certain packages (e.g. Matrix) even though I set USE_CHM=FALSE in M

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Thu, 12 Mar 2009 10:53:19 +0100 > Wacek Kusnierczyk wrote: > > >> well, ?'names<-' says: >> >> " >> Value: >> For 'names<-', the updated object. >> " >> >> which is only partially correct, in that the value will sometimes be >> an updated *copy* of the object.

Re: [Rd] iconv.dll in Windows

2009-03-12 Thread Prof Brian Ripley
On Thu, 12 Mar 2009, Uwe Ligges wrote: See .../R/src/gnuwin32/CHANGES: oiconv() is now done by a version of Yukihiro Nakadaira's win_iconv rather than by libiconv. This version is based on Windows' codepages and is not quite as comprehensive as libiconv: it is ho

Re: [Rd] iconv.dll in Windows

2009-03-12 Thread Uwe Ligges
See .../R/src/gnuwin32/CHANGES: o iconv() is now done by a version of Yukihiro Nakadaira's win_iconv rather than by libiconv. This version is based on Windows' codepages and is not quite as comprehensive as libiconv: it is however much smaller and easier to maintain

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Berwin A Turlach
On Thu, 12 Mar 2009 10:53:19 +0100 Wacek Kusnierczyk wrote: > well, ?'names<-' says: > > " > Value: > For 'names<-', the updated object. > " > > which is only partially correct, in that the value will sometimes be > an updated *copy* of the object. But since R supposedly uses call-by-val

[Rd] iconv.dll in Windows

2009-03-12 Thread James MacDonald
I recently built R-devel on Windows XP (sessionInfo below), and when loading libraries that require the iconv.dll was getting an error stating that 'This application has failed to start because iconv.dll was not found. Re-installing the application may fix this problem.'. An R-2.8.1 that I inst

[Rd] S4 coerce as.data.frame for lm

2009-03-12 Thread Thomas Roth (geb. Kaliwe)
#Hi, # #I posted this already on r-help... with no success :-( # #For a given class test, an object of class test cannot be used as data in the lm method although as.data.frame was implemented... where's my mistake? # #Suppose i have defined a S4 class test #S4 Class test containting a slot da

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > > Whoever said that must have been at that moment not as precise as he or > she could have been. Also, R does not behave according to what people > say on this list (which is good, because some times people they wrong > things on this list) but according to how it is docu

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Berwin A Turlach
On Thu, 12 Mar 2009 10:05:36 +0100 Wacek Kusnierczyk wrote: > well, as far as i remember, it has been said on this list that in r > the infix syntax is equivalent to the prefix syntax, [...] Whoever said that must have been at that moment not as precise as he or she could have been. Also, R doe

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > > is precisely why i'd think that the prefix 'names<-' should never do > destructive modifications, because that's what x = 'names<-'(x, 'foo'), > and thus also names(x) = 'foo', is for. > > to make the point differently, i'd expect the following two to be equivalent:

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Wed, 11 Mar 2009 20:29:14 +0100 > Wacek Kusnierczyk wrote: > > >> Simon Urbanek wrote: >> >>> Wacek, >>> >>> Peter gave you a full answer explaining it very well. If you really >>> want to be able to trace each instance yourself, you have to learn >>> far more

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > On Wed, 11 Mar 2009 20:31:18 +0100 > Wacek Kusnierczyk wrote: > > >> Simon Urbanek wrote: >> >>> On Mar 11, 2009, at 10:52 , Simon Urbanek wrote: >>> >>> Wacek, Peter gave you a full answer explaining it very well. If you really want to

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Berwin A Turlach
On Wed, 11 Mar 2009 20:29:14 +0100 Wacek Kusnierczyk wrote: > Simon Urbanek wrote: > > Wacek, > > > > Peter gave you a full answer explaining it very well. If you really > > want to be able to trace each instance yourself, you have to learn > > far more about R internals than you apparently know

Re: [Rd] surprising behaviour of names<-

2009-03-12 Thread Berwin A Turlach
On Wed, 11 Mar 2009 20:31:18 +0100 Wacek Kusnierczyk wrote: > Simon Urbanek wrote: > > > > On Mar 11, 2009, at 10:52 , Simon Urbanek wrote: > > > >> Wacek, > >> > >> Peter gave you a full answer explaining it very well. If you really > >> want to be able to trace each instance yourself, you have