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 d
On Tue, Feb 19, 2008 at 04:52:19PM +0200, K. Elo wrote:
> 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:lengt
On 2/19/2008 9:24 AM, Hans Ekbrand wrote:
> Hi list
>
> I have a data frame I would like to loop over. To begin with I would
> like crosstabulations using the first variabel in the data frame,
> which is called "meriter".
>
>> table(meriter[[1]], meriter[[3]])
>
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,
Kim
Hi list
I have a data frame I would like to loop over. To begin with I would
like crosstabulations using the first variabel in the data frame,
which is called "meriter".
> table(meriter[[1]], meriter[[3]])
5 matches
Mail list logo