On Tue, Feb 19, 2008 at 10:04:13AM -0500, Duncan Murdoch wrote: > On 2/19/2008 9:24 AM, Hans Ekbrand wrote:
[...]
> > I tried the following small code snippet which I copied from the
> > "Introduction to R":
> >
> >> for (i in 2:length(meriter)) { table(meriter[[1]], meriter[[i]]) }
>
> Where did you find that? I don't see anything like it. (If there is
> something like that, it should be fixed.)
>
> If you are referring to this snippet:
>
> >for (i in 1:length(yc)){
> plot(xc [[i ]],yc [[i ]]);
> abline(lsfit(xc [[i ]],yc [[i ]]))
> }
Yes, I copied the for construct from that snippet.
> then it has the important difference that plot() and abline() both have
> side effects (they do plotting), whereas table() doesn't.
I see. Thanks for the explanation.
--
Hans Ekbrand
signature.asc
Description: Digital signature
______________________________________________ [email protected] mailing list 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.

