Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread John McKown
I guess my C background has messed me up a bit for R. Well, recovering from
APL was worse. I lost all sense of hierarchy of operations.
On Feb 15, 2015 2:19 PM, "Duncan Murdoch"  wrote:

> On 15/02/2015 11:20 AM, John McKown wrote:
> > On Sun, Feb 15, 2015 at 9:54 AM, Duncan Murdoch
> > mailto:murdoch.dun...@gmail.com>>wrote:
> >
> > On 15/02/2015 10:08 AM, Sun Shine wrote:
> > > Thanks John: understanding it as a line return makes sense!
> >
> > But it's not right.  This is one statement, and it returns the value
> 3:
> >
> > 1 +
> > 2
> >
> > This is an error:
> >
> > 1 + ; 2
> >
> > The semicolon is a statement separator, not a line return.
> >
> >
> > ​Technically speaking a semicolon is a statement terminator, not a
> > statement separator. In the case of the R language, that is a "nit". In
> > the case of Pascal, it is a big difference.
> >
> >
> >
> > Duncan Murdoch
> >
> >
> > ​This is one reason why I _always_ use the semi-colon. It is _never_
> > really wrong to do so. It may be _unnecessary_ in some case. It is also
> > why I always use <- as the assignment operator (well, that and because I
> > like it from my APL background). If there are two ways to express
> > something, and one of them is _always_ correct whereas the other _might
> > not_ be correct in some cases, then I think doing the former is simply
> > "better form". But, then, I'm anal about other things to. And that
> > doesn't apply to interactive use. I don't terminate my interactive
> > statements with a semi-colon all the time. Just most of the time. Of
> > course, I'm a touch typist too and so it is not really much of a problem
> > for me.​
>
> I don't use semicolons unless they are necessary, and I don't like it
> when my students do.  For example, you could be misled by code like this:
>
> x = 1;
> y = 2;
> verylongname = x + y
> + 1;
>
> If this were C, verylongname would end up with the value 4.  If you read
> it and only see 3 "terminators", you might think R is the same, but it's
> not.  R sees that as 7 different statements:  two on the 1st, 2nd and
> 4th lines (in each case the second statement is empty), and one
> statement on line 3.  So verylongname ends up with the value 3, not 4.
>
> Cues to remind you what language you're using are a good thing.  That's
> one reason to use <- (which I always do) instead of =, and not to use
> unnecessary semicolons.
>
> Duncan Murdoch
>
> >
> >
> >
> > --
> > He's about as useful as a wax frying pan.
> >
> > 10 to the 12th power microphones = 1 Megaphone
> >
> > Maranatha! <><
> > John McKown
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread Duncan Murdoch
On 15/02/2015 11:20 AM, John McKown wrote:
> On Sun, Feb 15, 2015 at 9:54 AM, Duncan Murdoch
> mailto:murdoch.dun...@gmail.com>>wrote:
> 
> On 15/02/2015 10:08 AM, Sun Shine wrote:
> > Thanks John: understanding it as a line return makes sense!
> 
> But it's not right.  This is one statement, and it returns the value 3:
> 
> 1 +
> 2
> 
> This is an error:
> 
> 1 + ; 2
> 
> The semicolon is a statement separator, not a line return.
> 
> 
> ​Technically speaking a semicolon is a statement terminator, not a
> statement separator. In the case of the R language, that is a "nit". In
> the case of Pascal, it is a big difference.
>  
> 
> 
> Duncan Murdoch
> 
> 
> ​This is one reason why I _always_ use the semi-colon. It is _never_
> really wrong to do so. It may be _unnecessary_ in some case. It is also
> why I always use <- as the assignment operator (well, that and because I
> like it from my APL background). If there are two ways to express
> something, and one of them is _always_ correct whereas the other _might
> not_ be correct in some cases, then I think doing the former is simply
> "better form". But, then, I'm anal about other things to. And that
> doesn't apply to interactive use. I don't terminate my interactive
> statements with a semi-colon all the time. Just most of the time. Of
> course, I'm a touch typist too and so it is not really much of a problem
> for me.​

I don't use semicolons unless they are necessary, and I don't like it
when my students do.  For example, you could be misled by code like this:

x = 1;
y = 2;
verylongname = x + y
+ 1;

If this were C, verylongname would end up with the value 4.  If you read
it and only see 3 "terminators", you might think R is the same, but it's
not.  R sees that as 7 different statements:  two on the 1st, 2nd and
4th lines (in each case the second statement is empty), and one
statement on line 3.  So verylongname ends up with the value 3, not 4.

Cues to remind you what language you're using are a good thing.  That's
one reason to use <- (which I always do) instead of =, and not to use
unnecessary semicolons.

Duncan Murdoch

>  
> 
> 
> -- 
> He's about as useful as a wax frying pan.
> 
> 10 to the 12th power microphones = 1 Megaphone
> 
> Maranatha! <><
> John McKown

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread John Kane

Mea culpa, mea culpa
John Kane
Kingston ON Canada

-Original Message-
From: john.archie.mck...@gmail.com
Sent: Sun, 15 Feb 2015 10:20:39 -0600
To: murdoch.dun...@gmail.com
Subject: Re: [R] Noob question re: writing while loops on one line

On Sun, Feb 15, 2015 at 9:54 AM, Duncan Murdoch  
wrote:

On 15/02/2015 10:08 AM, Sun Shine wrote:
 > Thanks John: understanding it as a line return makes sense!

 But it's not right.  This is one statement, and it returns the value 3:

 1 +
 2

 This is an error:

 1 + ; 2

 The semicolon is a statement separator, not a line return.

 Technically speaking a semicolon is a statement terminator, not a statement 
separator. In the case of the R language, that is a "nit". In the case of 
Pascal, it is a big difference.

 Duncan Murdoch

 This is one reason why I _always_ use the semi-colon. It is _never_ really 
wrong to do so. It may be _unnecessary_ in some case. It is also why I always 
use <- as the assignment operator (well, that and because I like it from my APL 
background). If there are two ways to express something, and one of them is 
_always_ correct whereas the other _might not_ be correct in some cases, then I 
think doing the former is simply "better form". But, then, I'm anal about other 
things to. And that doesn't apply to interactive use. I don't terminate my 
interactive statements with a semi-colon all the time. Just most of the time. 
Of course, I'm a touch typist too and so it is not really much of a problem for 
me. 

-- 

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread Jeff Newmiller
Best not to be pedantic, John, unless you are going to be right. Please read 
section 10.3.5 in the R Language Definition  document. This is R, not C.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On February 15, 2015 8:20:39 AM PST, John McKown  
wrote:
>On Sun, Feb 15, 2015 at 9:54 AM, Duncan Murdoch
>
>wrote:
>
>> On 15/02/2015 10:08 AM, Sun Shine wrote:
>> > Thanks John: understanding it as a line return makes sense!
>>
>> But it's not right.  This is one statement, and it returns the value
>3:
>>
>> 1 +
>> 2
>>
>> This is an error:
>>
>> 1 + ; 2
>>
>> The semicolon is a statement separator, not a line return.
>>
>
>​Technically speaking a semicolon is a statement terminator, not a
>statement separator. In the case of the R language, that is a "nit". In
>the
>case of Pascal, it is a big difference.
>
>
>>
>> Duncan Murdoch
>>
>>
>​This is one reason why I _always_ use the semi-colon. It is _never_
>really
>wrong to do so. It may be _unnecessary_ in some case. It is also why I
>always use <- as the assignment operator (well, that and because I like
>it
>from my APL background). If there are two ways to express something,
>and
>one of them is _always_ correct whereas the other _might not_ be
>correct in
>some cases, then I think doing the former is simply "better form". But,
>then, I'm anal about other things to. And that doesn't apply to
>interactive
>use. I don't terminate my interactive statements with a semi-colon all
>the
>time. Just most of the time. Of course, I'm a touch typist too and so
>it is
>not really much of a problem for me.​
>
>
>
>-- 
>He's about as useful as a wax frying pan.
>
>10 to the 12th power microphones = 1 Megaphone
>
>Maranatha! <><
>John McKown
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread John McKown
On Sun, Feb 15, 2015 at 9:54 AM, Duncan Murdoch 
wrote:

> On 15/02/2015 10:08 AM, Sun Shine wrote:
> > Thanks John: understanding it as a line return makes sense!
>
> But it's not right.  This is one statement, and it returns the value 3:
>
> 1 +
> 2
>
> This is an error:
>
> 1 + ; 2
>
> The semicolon is a statement separator, not a line return.
>

​Technically speaking a semicolon is a statement terminator, not a
statement separator. In the case of the R language, that is a "nit". In the
case of Pascal, it is a big difference.


>
> Duncan Murdoch
>
>
​This is one reason why I _always_ use the semi-colon. It is _never_ really
wrong to do so. It may be _unnecessary_ in some case. It is also why I
always use <- as the assignment operator (well, that and because I like it
from my APL background). If there are two ways to express something, and
one of them is _always_ correct whereas the other _might not_ be correct in
some cases, then I think doing the former is simply "better form". But,
then, I'm anal about other things to. And that doesn't apply to interactive
use. I don't terminate my interactive statements with a semi-colon all the
time. Just most of the time. Of course, I'm a touch typist too and so it is
not really much of a problem for me.​



-- 
He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread Duncan Murdoch
On 15/02/2015 10:08 AM, Sun Shine wrote:
> Thanks John: understanding it as a line return makes sense!

But it's not right.  This is one statement, and it returns the value 3:

1 +
2

This is an error:

1 + ; 2

The semicolon is a statement separator, not a line return.

Duncan Murdoch

> 
> Cheers
> 
> Sun
> 
> 
> On 15/02/15 14:59, John Kane wrote:
>> Hi Sun,
>> Can you check the code in the one line command in RStudio?
>>
>> I tied it and got the expected error.  Or to put it another way, it should 
>> not have run for you :)
>>
>> The semi-colon is funtioning as a line return
>>
>> John Kane
>> Kingston ON Canada
>>
>>
>>> -Original Message-
>>> From: phaedr...@gmail.com
>>> Sent: Sun, 15 Feb 2015 10:55:28 +
>>> To: drjimle...@gmail.com
>>> Subject: Re: [R] Noob question re: writing while loops on one line
>>>
>>> Brilliant Jim - that does the trick!!
>>>
>>> I guess then that the semi-colon rule works for any program or function
>>> that is being written on one line?
>>>
>>> Any reason why when writing this out in the RStudio source editor no
>>> semi-colon is required, but it is when written in the interactive
>>> console?
>>>
>>> Thanks again
>>>
>>> Sun
>>>
>>>
>>> On 15/02/15 10:41, Jim Lemon wrote:
>>>> Hi Sun,
>>>> Try including a semicolon.
>>>>
>>>> while(count < 10) { print(count); count<-count+1 }
>>>>
>>>> Jim
>>>>
>>>>
>>>> On Sun, Feb 15, 2015 at 9:20 PM, Sun Shine  wrote:
>>>>> Hi list
>>>>>
>>>>> I'm working through some exercises and did a while loop which raised an
>>>>> issue for me:
>>>>>
>>>>> I can write out the while loop so:
>>>>>
>>>>>> count <- 0
>>>>> while(count < 10) {
>>>>>   print(count)
>>>>>   count <- count + 1
>>>>>  }
>>>>>
>>>>> And this works fine.
>>>>>
>>>>> Trying to do the same thing all on one line however gives this error:
>>>>>
>>>>> "Error: unexpected symbol in "while(count < 10) { print(count) count""
>>>>>
>>>>> My question:
>>>>>
>>>>> How can one write out a while loop all in one line? Is there a symbol
>>>>> or
>>>>> something that I should be including?
>>>>>
>>>>> Thanks for any suggestions.
>>>>>
>>>>> Sun
>>>>>
>>>>> __
>>>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>> PLEASE do read the posting guide
>>>>> http://www.R-project.org/posting-guide.html
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>> 
>> FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
>> family!
>> Visit http://www.inbox.com/photosharing to find out more!
>>
>>
>>
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread Sun Shine

Thanks John: understanding it as a line return makes sense!

Cheers

Sun


On 15/02/15 14:59, John Kane wrote:

Hi Sun,
Can you check the code in the one line command in RStudio?

I tied it and got the expected error.  Or to put it another way, it should not 
have run for you :)

The semi-colon is funtioning as a line return

John Kane
Kingston ON Canada



-Original Message-
From: phaedr...@gmail.com
Sent: Sun, 15 Feb 2015 10:55:28 +
To: drjimle...@gmail.com
Subject: Re: [R] Noob question re: writing while loops on one line

Brilliant Jim - that does the trick!!

I guess then that the semi-colon rule works for any program or function
that is being written on one line?

Any reason why when writing this out in the RStudio source editor no
semi-colon is required, but it is when written in the interactive
console?

Thanks again

Sun


On 15/02/15 10:41, Jim Lemon wrote:

Hi Sun,
Try including a semicolon.

while(count < 10) { print(count); count<-count+1 }

Jim


On Sun, Feb 15, 2015 at 9:20 PM, Sun Shine  wrote:

Hi list

I'm working through some exercises and did a while loop which raised an
issue for me:

I can write out the while loop so:


count <- 0

while(count < 10) {
  print(count)
  count <- count + 1
 }

And this works fine.

Trying to do the same thing all on one line however gives this error:

"Error: unexpected symbol in "while(count < 10) { print(count) count""

My question:

How can one write out a while loop all in one line? Is there a symbol
or
something that I should be including?

Thanks for any suggestions.

Sun

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!





__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread John Kane
Hi Sun, 
Can you check the code in the one line command in RStudio?

I tied it and got the expected error.  Or to put it another way, it should not 
have run for you :)

The semi-colon is funtioning as a line return 

John Kane
Kingston ON Canada


> -Original Message-
> From: phaedr...@gmail.com
> Sent: Sun, 15 Feb 2015 10:55:28 +
> To: drjimle...@gmail.com
> Subject: Re: [R] Noob question re: writing while loops on one line
> 
> Brilliant Jim - that does the trick!!
> 
> I guess then that the semi-colon rule works for any program or function
> that is being written on one line?
> 
> Any reason why when writing this out in the RStudio source editor no
> semi-colon is required, but it is when written in the interactive
> console?
> 
> Thanks again
> 
> Sun
> 
> 
> On 15/02/15 10:41, Jim Lemon wrote:
>> Hi Sun,
>> Try including a semicolon.
>> 
>> while(count < 10) { print(count); count<-count+1 }
>> 
>> Jim
>> 
>> 
>> On Sun, Feb 15, 2015 at 9:20 PM, Sun Shine  wrote:
>>> Hi list
>>> 
>>> I'm working through some exercises and did a while loop which raised an
>>> issue for me:
>>> 
>>> I can write out the while loop so:
>>> 
>>>> count <- 0
>>> while(count < 10) {
>>>  print(count)
>>>  count <- count + 1
>>> }
>>> 
>>> And this works fine.
>>> 
>>> Trying to do the same thing all on one line however gives this error:
>>> 
>>> "Error: unexpected symbol in "while(count < 10) { print(count) count""
>>> 
>>> My question:
>>> 
>>> How can one write out a while loop all in one line? Is there a symbol
>>> or
>>> something that I should be including?
>>> 
>>> Thanks for any suggestions.
>>> 
>>> Sun
>>> 
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread Sun Shine

Brilliant Jim - that does the trick!!

I guess then that the semi-colon rule works for any program or function 
that is being written on one line?


Any reason why when writing this out in the RStudio source editor no 
semi-colon is required, but it is when written in the interactive console?


Thanks again

Sun


On 15/02/15 10:41, Jim Lemon wrote:

Hi Sun,
Try including a semicolon.

while(count < 10) { print(count); count<-count+1 }

Jim


On Sun, Feb 15, 2015 at 9:20 PM, Sun Shine  wrote:

Hi list

I'm working through some exercises and did a while loop which raised an
issue for me:

I can write out the while loop so:


count <- 0

while(count < 10) {
 print(count)
 count <- count + 1
}

And this works fine.

Trying to do the same thing all on one line however gives this error:

"Error: unexpected symbol in "while(count < 10) { print(count) count""

My question:

How can one write out a while loop all in one line? Is there a symbol or
something that I should be including?

Thanks for any suggestions.

Sun

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Noob question re: writing while loops on one line

2015-02-15 Thread Jim Lemon
Hi Sun,
Try including a semicolon.

while(count < 10) { print(count); count<-count+1 }

Jim


On Sun, Feb 15, 2015 at 9:20 PM, Sun Shine  wrote:
> Hi list
>
> I'm working through some exercises and did a while loop which raised an
> issue for me:
>
> I can write out the while loop so:
>
>> count <- 0
>
> while(count < 10) {
> print(count)
> count <- count + 1
>}
>
> And this works fine.
>
> Trying to do the same thing all on one line however gives this error:
>
> "Error: unexpected symbol in "while(count < 10) { print(count) count""
>
> My question:
>
> How can one write out a while loop all in one line? Is there a symbol or
> something that I should be including?
>
> Thanks for any suggestions.
>
> Sun
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Noob question re: writing while loops on one line

2015-02-15 Thread Sun Shine

Hi list

I'm working through some exercises and did a while loop which raised an 
issue for me:


I can write out the while loop so:

> count <- 0

while(count < 10) {
print(count)
count <- count + 1
   }

And this works fine.

Trying to do the same thing all on one line however gives this error:

"Error: unexpected symbol in "while(count < 10) { print(count) count""

My question:

How can one write out a while loop all in one line? Is there a symbol or 
something that I should be including?


Thanks for any suggestions.

Sun

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.