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
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
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
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
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
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
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
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
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
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
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
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
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]
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
=== 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 ;
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...
[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
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
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
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
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) !
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-
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
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
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
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
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
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
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
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,
___
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
=== 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
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
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
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
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
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
37 matches
Mail list logo