[ESS] Does R fix() or edit() work for you these days?]

Kasper Daniel Hansen khansen at stat.Berkeley.EDU
Mon Sep 10 19:25:18 CEST 2007


On Sep 10, 2007, at 9:23 AM, 8rino-Luca Pantani wrote:

> Martin Maechler ha scritto:
>> My opinion still applies:
>>
>>    Using fix() or edit() is "wrong in principle"
>>    when working with ESS.
>>
>> Martin
>>
>>
>  From my non-programmer-non-statistician I sincerely trust you,  
> Michael,
> but please, could you be so kind to spend some time in briefly
> explaining me what's wrong with fix/edit under ESS ?
> I mostly use fix/edit only to see values in large dataframes, when I'm
> enough lazy not to use indexes.
> For such a use, which are the "right" alternatives, other than lines
> like  df.dataframe[101:107, 2] or df.dataframe[df.dataframe 
> $FACTOR=="foo", ]

Martin is advocating "The source is real". The short explanation is  
that every R object you have, should have some _code_ creating that  
object. However when someone uses fix to edit a function, suddenly  
whatever source code (s)he has, is obsolete.

You are describing a situation where you just use "fix" to _look_ at  
a dataframe, _not_ modify it. And that would be entirely within  
Martin's paradigm. However, as soon as you modify the dataframe, you  
do not have code creating that object anymore.

Kasper

> BTW Which are your favourite way of naming objects ?
> In other words, for a dataframe, do you prefer df.foo. foo.df,
> (plain)foo or what else ?
> Are there some rules to avoid/reduce error in working with XEmacs/ 
> ESS/R ?
> I mean rules such as naming objects in dataframe always in maiuscule,
> vectors always in minuscule and things like that.

There are no such rules. The only approximate rule which many people  
kind of uses is that names with "." in them refers to S3-methods/ 
objects/classes and names with camelCase like dataFrame refers to S4  
methods/objects/classes/

Kasper

> -- 
> Ottorino
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list