[R] list?

David Winsemius dwinsemius at comcast.net
Tue Sep 16 04:12:26 CEST 2008


On Sep 15, 2008, at 9:46 PM, Paulo Cardoso wrote:

> Hi,
>
> How the data bellow was obtained? What object is tN?
>
>> tN
>
> 1  2  3  4  5  6  7  8 10 11 12
> 6 13 10 16 19 12 11  8  2  2  1
>
> str(tN)
> 'table' int [, 1:11] 6 13 10 16 19 12 11 8 2 2 ...
> - attr(*, "dimnames")=List of 1
>  ..$ : chr [1:11] "1" "2" "3" "4" ...
>
> I'd like to do the same with another data.

It's difficult for us to to know how it was obtained.

Below is one plausible manner:

 > tn <- rpois(120,6)
 > table(tn)
tn
  1  2  3  4  5  6  7  8  9 10 11 12 13
  2  3  9 18 18 22 14 18  8  2  3  1  2

-- 
David Winsemius



More information about the R-help mailing list