actually there are too many subjects.

is there a way that i can make a table such that it can tell me the
frequency of number of observations?

Like

3 4 5
------------
30 40 60

which means there are 30 subjects which each has 3 obs., 40 which each has 4
obs.....


 On 1/27/07, Chuck Cleland <[EMAIL PROTECTED]> wrote:
>
> gallon li wrote:
> > i have a data set with repeated measures on same people, structure like
> > below:
> >
> > id x1 x2 ...
> > 001 10 20 ...
> > 001 8 45 ...
> > 001 4 2 ...
> > 002 ....
> > 002 ...
> > 002 ....
> > 002 ....
> > 003 ....
> > .......
> >
> > what is the easist way to show how many observations for each subject
> id?
>
> If the data are in a data frame called df, do the following:
>
> table(df$id)
>
> Also, the following is useful for seeing how many people have a
> particular number of observations:
>
> table(table(df$id))
>
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [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<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
>
> --
> Chuck Cleland, Ph.D.
> NDRI, Inc.
> 71 West 23rd Street, 8th floor
> New York, NY 10010
> tel: (212) 845-4495 (Tu, Th)
> tel: (732) 512-0171 (M, W, F)
> fax: (917) 438-0894
>

        [[alternative HTML version deleted]]

______________________________________________
[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.

Reply via email to