Re: [R] simple usage of "for"

From: K. Elo <maillists_at_nic.fi>
Date: Tue, 19 Feb 2008 16:52:19 +0200

Hi,

Hans Ekbrand wrote (19.2.2008):
> 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]]) }

Try:
for (i in 2:length(meriter)) { print(table(meriter[[1]], meriter[[i]])) }

Kind regards,
Kimmo



R-help_at_r-project.org 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. Received on Tue 19 Feb 2008 - 14:55:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Feb 2008 - 15:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive