Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread Jim Lemon
Adaikalavan Ramasamy wrote: Yes, it drives me mad too when people use = instead of - for assignment and suppress spaces in an naive attempt for saving space. In fact, I like the - assignment operator, but tend to write code densely myself as that is the way I like to view it. As R formats

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread P Ehlers
Oh Patrick, surely German Capitalization is better! :) Peter Patrick Connolly wrote: On Tue, 06-Dec-2005 at 04:21PM +, Patrick Burns wrote: | I don't put in extraneous ';' because I maybe get a | blister on my little finger. | | I suspect that those who find the semi-colons ugly in

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread Dave Roberts
Well, this has been an interesting thread. I guess my own perspective is warped, having never been a C programmer. My native languages are FORTRAN, python, and R, all of which accept (or demand) a linefeed as a terminator, rather than a semicolon, and two of which are very particular about

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread Gabor Grothendieck
On 12/7/05, Dave Roberts [EMAIL PROTECTED] wrote: Well, this has been an interesting thread. I guess my own perspective is warped, having never been a C programmer. My native languages are FORTRAN, python, and R, all of which accept (or demand) a linefeed as a terminator, rather than a

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread Jan T. Kim
On Tue, Dec 06, 2005 at 04:21:01PM +, Patrick Burns wrote: I don't put in extraneous ';' because I maybe get a blister on my little finger. I suspect that those who find the semi-colons ugly in R do not find them ugly in C. I think the reason there would be a visceral reaction in R

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread Deepayan Sarkar
On 12/7/05, Jan T. Kim [EMAIL PROTECTED] wrote: On Tue, Dec 06, 2005 at 04:21:01PM +, Patrick Burns wrote: I don't put in extraneous ';' because I maybe get a blister on my little finger. I suspect that those who find the semi-colons ugly in R do not find them ugly in C. I think

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-07 Thread Martin Maechler
DeepS == Deepayan Sarkar [EMAIL PROTECTED] on Wed, 7 Dec 2005 19:15:52 -0600 writes: DeepS On 12/7/05, Jan T. Kim [EMAIL PROTECTED] wrote: On Tue, Dec 06, 2005 at 04:21:01PM +, Patrick Burns wrote: I don't put in extraneous ';' because I maybe get a blister on my

[R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Martin Maechler
vincent == vincent [EMAIL PROTECTED] on Tue, 06 Dec 2005 11:09:36 +0100 writes: vincent shanmuha boopathy a écrit : a-function(a,b,c,d) { k=a+b l=c+d m=k+l } in this example the function will return only the value of m ...But I like to

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Adaikalavan Ramasamy
On Tue, 2005-12-06 at 13:43 +0100, Martin Maechler wrote: vincent == vincent [EMAIL PROTECTED] on Tue, 06 Dec 2005 11:09:36 +0100 writes: vincent shanmuha boopathy a écrit : a-function(a,b,c,d) { k=a+b l=c+d m=k+l } in this example

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Philippe Grosjean
Martin Maechler wrote: vincent == vincent [EMAIL PROTECTED] on Tue, 06 Dec 2005 11:09:36 +0100 writes: vincent shanmuha boopathy a écrit : a-function(a,b,c,d) { k=a+b l=c+d m=k+l } in this example the function will return only the

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Adaikalavan Ramasamy
Yes, it drives me mad too when people use = instead of - for assignment and suppress spaces in an naive attempt for saving space. As an example compare o=fn(x=1,y=10,z=1) with o - fn( x=1, y=10, z=1 ) Regards, Adai On Tue, 2005-12-06 at 13:43 +0100, Martin

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread vincent
Martin Maechler a écrit : please, please, these trailing ; are *so* ugly. This is GNU S, not C (or matlab) ! but I'll be happy already if you could drop these ugly empty statements at the end of your lines... May I disagree ? I find missing ; at end of lines *so* ugly. Ugly/not ugly

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Prof Brian Ripley
By the way, does anybody knows if there is a R tidy or some similar project to automatically reformat (and possibly check) R code, beside what Emacs does? See the appropriate section in `Writing R Extensions' (3.1 `Tidying R code'). -- Brian D. Ripley, [EMAIL PROTECTED]

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Xiaofan Li
I consistently use ; at every end of my R code and have found it much more neat than those sentences without an end; for - and =, if I were the author I would rather take the first representation as a sign of passing-by-reference while the latter by value. Xiaofan Li DAMTP, University of

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread ronggui
=== 2005-12-06 22:16:17 您在来信中写道:=== Martin Maechler a �crit : please, please, these trailing ; are *so* ugly. This is GNU S, not C (or matlab) ! but I'll be happy already if you could drop these ugly empty statements at the end of your lines... May I disagree ? I find missing ;

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Jan T. Kim
On Tue, Dec 06, 2005 at 03:16:17PM +0100, [EMAIL PROTECTED] wrote: Martin Maechler a ?crit : please, please, these trailing ; are *so* ugly. This is GNU S, not C (or matlab) ! but I'll be happy already if you could drop these ugly empty statements at the end of your lines...

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread P Ehlers
[EMAIL PROTECTED] wrote: Martin Maechler a écrit : please, please, these trailing ; are *so* ugly. This is GNU S, not C (or matlab) ! but I'll be happy already if you could drop these ugly empty statements at the end of your lines... May I disagree ? I find missing ; at end of

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Patrick Burns
I don't put in extraneous ';' because I maybe get a blister on my little finger. I suspect that those who find the semi-colons ugly in R do not find them ugly in C. I think the reason there would be a visceral reaction in R but not in C is that there is a danger when using them in R that they

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread McGehee, Robert
Jan T. Kim wrote: There is a draft R Coding Convention available at http://www.maths.lth.se/help/R/RCC/ which may be useful for finding a style that is good because it is widely used and therefore familiar to a large number of readers.-- However, as the author Henrik Bengtsson

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Martin Maechler
P == P Ehlers [EMAIL PROTECTED] on Tue, 06 Dec 2005 08:35:07 -0700 writes: P [EMAIL PROTECTED] wrote: Martin Maechler a écrit : please, please, these trailing ; are *so* ugly. This is GNU S, not C (or matlab) ! but I'll be happy already if you

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Liaw, Andy
From: Martin Maechler P == P Ehlers [EMAIL PROTECTED] on Tue, 06 Dec 2005 08:35:07 -0700 writes: P [EMAIL PROTECTED] wrote: Martin Maechler a écrit : please, please, these trailing ; are *so* ugly. This is GNU S, not C (or matlab) !

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Xiaofan Li
I consistently use ; at every end of my R code and have found it much more neat than those sentences without an end; for - and =, if I were the author I would rather take the first representation as a sign of passing-by-reference while the latter by value. Xiaofan -Original Message-

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread vincent
ronggui a écrit : I think it is NOT just for historical reason. see the following example: rm(x) mean(x=1:10) [1] 5.5 x Error: object x not found x is an argument local to mean(), did you expect another answer ? mean(x-1:10) [1] 5.5 x [1] 1 2 3 4 5 6 7 8 9 10 What is the goal

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Ted Harding
On 06-Dec-05 Martin Maechler wrote: [But really, I'm more concerned and quite bit disappointed by the diehard ; lovers] Martin Maechler Well, while not die-hard, I will put in my own little reason for often using ; at the end of lines which don't need them. Basically, this is done to

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread vincent
Patrick Burns a écrit : We get questions on R-help often enough about why code like: if(x 0) y - 4 else y - 4.5e23 doesn't work. If people habitually used semi-colons, those sorts of questions would probably multiply. I wrote end of line in my first message, but in fact I did mean

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Duncan Murdoch
Xiaofan Li wrote: I consistently use ; at every end of my R code and have found it much more neat than those sentences without an end; for - and =, if I were the author I would rather take the first representation as a sign of passing-by-reference while the latter by value. The problem with

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Liaw, Andy
From: [EMAIL PROTECTED] ronggui a écrit : I think it is NOT just for historical reason. see the following example: rm(x) mean(x=1:10) [1] 5.5 x Error: object x not found x is an argument local to mean(), did you expect another answer ? mean(x-1:10) [1] 5.5 x [1] 1

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Deepayan Sarkar
On 12/6/05, Ted Harding [EMAIL PROTECTED] wrote: On 06-Dec-05 Martin Maechler wrote: [But really, I'm more concerned and quite bit disappointed by the diehard ; lovers] Martin Maechler Well, while not die-hard, I will put in my own little reason for often using ; at the end of lines

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Ted Harding
On 06-Dec-05 Deepayan Sarkar wrote: [...] The greater readability of the first relative to the second is obvious. The compactness of the second relative to the first is evident. Obtaining the second from the first by repeated J is very quick. I'm curious: exactly what purpose does this

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Patrick Connolly
On Tue, 06-Dec-2005 at 01:00PM +, Adaikalavan Ramasamy wrote: | Yes, it drives me mad too when people use = instead of - for | assignment and suppress spaces in an naive attempt for saving space. | | As an example compare | | o=fn(x=1,y=10,z=1) | | with | | o - fn( x=1,

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Hong Ooi
___ Hm, a style war on R-Help. I wonder if this goes for long enough, we'll come to the question of where to put the braces. ;) Personally, I always use - instead of = where applicable. In addition to the

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread ronggui
=== 2005-12-07 04:17:03 您在来信中写道:=== From: [EMAIL PROTECTED] ronggui a �crit : I think it is NOT just for historical reason. see the following example: rm(x) mean(x=1:10) [1] 5.5 x Error: object x not found x is an argument local to mean(), did you expect another

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread GuangXing
I think - is better than = in some cases. === 2005-12-07 08:51:30 Write:=== === 2005-12-07 04:17:03 您在来信中写道:=== From: [EMAIL PROTECTED] ronggui a �crit : I think it is NOT just for historical reason. see the following example: rm(x) mean(x=1:10) [1] 5.5 x

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Philippe Grosjean
Hello, About the R style war: as soon as you write code for yourself, you can do what you want, of course. If your code is shared (for instance, code in packages submitted to CRAN), it makes sense to render it so that it is easier to read *by a majority of people*. The only way to make sure

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Patrick Connolly
On Tue, 06-Dec-2005 at 04:21PM +, Patrick Burns wrote: | I don't put in extraneous ';' because I maybe get a | blister on my little finger. | | I suspect that those who find the semi-colons ugly in | R do not find them ugly in C. Nor in perl, mysql or php. I quite like how R is rather

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Berwin A Turlach
vic == vincent [EMAIL PROTECTED] writes: vic ronggui a __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread vincent
Philippe Grosjean a écrit : So, who said there is an R style war? There is one set of rules to follow. Point. I quite agree with your message, but as far as I understood today, there is no official R style chart, (official = from the R core dev team). http://www.maths.lth.se/help/R/RCC/ is