Re: [R] R as a non-functional language

2011-03-21 Thread Bill.Venables
s.abb...@gmail.com; Venables, Bill (CMIS, Dutton Park) Cc: r-help@r-project.org Subject: RE: [R] R as a non-functional language Dear Russ, Why not use simply pH <- c(area1 = 4.5, area2 = 7, mud = 7.3, dam = 8.2, middle = 6.3) That notation is IMHO the most readable for students. Best regards,

Re: [R] R as a non-functional language

2011-03-21 Thread ONKELINX, Thierry
an: bill.venab...@csiro.au > CC: r-help@r-project.org > Onderwerp: Re: [R] R as a non-functional language > > I'm afraid I disagree. As a number of people have shown, > it's certainly possible to get the end result > > > pH <- c(4.5,7,7.3,8.2,6.3) > >

Re: [R] R as a non-functional language

2011-03-20 Thread peter dalgaard
; PS the form >> >> names(p) <- c(...) >> >> is still functional, of course. It is just a bit of syntactic sugar for >> the clumsier >> >> p <- `names<-`(p, c(...)) >> >> e.g. >>> pH <- `names<-`(pH, letters[1:5]) &

Re: [R] R as a non-functional language

2011-03-20 Thread Johannes Huesing
Russ Abbott [Sun, Mar 20, 2011 at 06:46:04AM CET]: > I'm afraid I disagree. I don't think there is much disagreement. You have been shown that there is a functional way to rephrase your example. I suppose you don't disagree that the structure() expression has no side effects. And hardly anyone

Re: [R] R as a non-functional language

2011-03-19 Thread Russ Abbott
<- c(...) > > is still functional, of course. It is just a bit of syntactic sugar for > the clumsier > > p <- `names<-`(p, c(...)) > > e.g. > > pH <- `names<-`(pH, letters[1:5]) > > pH > a b c d e > 4.5 7.0 7.3 8.2 6.3 > > > &

Re: [R] R as a non-functional language

2011-03-19 Thread Bill.Venables
abor Grothendieck Sent: Sunday, 20 March 2011 2:33 PM To: russ.abb...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] R as a non-functional language On Sun, Mar 20, 2011 at 12:20 AM, Russ Abbott wrote: > I'm reading Torgo (2010) *Data Mining with > R*<http://www.liaad.up.pt/~lt

Re: [R] R as a non-functional language

2011-03-19 Thread Gabor Grothendieck
On Sun, Mar 20, 2011 at 12:20 AM, Russ Abbott wrote: > I'm reading Torgo (2010) *Data Mining with > R*in > preparation for a class I'll be teaching next quarter.  Here's an > example > that is very non-functional. > >> pH <- c(4.5,7,7.3,8.2