Re: [R] understanding with

2016-09-10 Thread peter dalgaard
> On 10 Sep 2016, at 08:27 , Jeff Newmiller wrote: > > > The with function is just helpful syntactic sugar for reducing repetitious > typing of the name of the list/data frame that contains several objects you > want to refer to in a single expression. A little more than that, witness the di

Re: [R] understanding with

2016-09-09 Thread Jeff Newmiller
Indeed, you don't have to write code with constructs you don't like, but you should be able to read it. Considerable effort under the label "scope" [1] is expended in programming language design specifically to allow re-use of variable names in different contexts. Because I do understand scope,

Re: [R] understanding with

2016-09-09 Thread Sarah Goslee
Hi Carl, The duplicate names were to demonstrate the difference in search path and environment, since you appeared to be confused. If you dislike with, don't use it. On Fri, Sep 9, 2016 at 5:20 PM, Carl Sutton wrote: > Hi Sarah > > I see the difference, but pardon the big yawn, who writes cod

Re: [R] understanding with

2016-09-09 Thread Sarah Goslee
Like others on the list I have no interest in wading through your block of HTML-mangled text. But if your question is clearly stated by the subject line, then it's quite straightforward. with() saves you typing and often increases code clarity by telling R where to look for named variables # Thi

[R] understanding with

2016-09-08 Thread Carl Sutton via R-help
 Hi I have been doing theR-exercises to improve my R programming capabilities.   Data.frame exercise4 showed me that I have a languageproblem.  Yes, I am frustrated, but please don’t take this as acriticism of the R language.  Theroutines I have managed to write do marvelous things in a short per