Dear Olaf,

thanks for your reply, at first sight I did not link this behaviour to
that subsetting feature that I must admit I am not used to.

Ciao

Simone



On Mon, Oct 4, 2010 at 1:13 AM, Olaf Mersmann
<ol...@statistik.tu-dortmund.de> wrote:
> Dear Simone,
>
> On 04.10.2010, at 01:01, Simone Giannerini wrote:
>> it looks like that tabulate() does not check for the bounds of the input.
>> Reproducible example:
>>
>>> b <- 1:2
>>> tabulate(b[1:100])
>> [1] 1 1
>
> this looks perfectly reasonable. Consider the result of
>
>> b <- 1:2
>> b[1:100]
>  [1]  1  2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 
> NA
>  [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 
> NA
>  [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 
> NA
>  [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 
> NA
>
> and check the help page for tabulate (esp. the na.rm argument).
>
> What was your expected result?
>
> Cheers,
> Olaf
>
>



-- 
______________________________________________________

Simone Giannerini
Dipartimento di Scienze Statistiche "Paolo Fortunati"
Universita' di Bologna
Via delle belle arti 41 - 40126  Bologna,  ITALY
Tel: +39 051 2098262  Fax: +39 051 232153
http://www2.stat.unibo.it/giannerini/

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to