Re: [Rd] packBits (PR#9374)

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue 21 Nov 2006 - 10:57:09 GMT

On 11/21/2006 12:09 AM, prokaj@cs.elte.hu wrote:
> Full_Name: Prokaj Vilmos
> Version: R 2-4-0
> OS: Windows
> Submission from: (NULL) (193.224.79.8)
>
>
> PackBits(rbinom(32,1,0.5)==1,"integer")
> does not work.
>
> z<-packBits(rbinom(32,1,.5)==1,"integer")
> Error in packBits(x, type) : argument 'x' must be raw, integer or logical
>
>
> Taking a closer look at the C code
> main/character.c do_packBits rutin
> one can find the following checking
>
> if (TYPEOF(x) != RAWSXP && TYPEOF(x) != RAWSXP && TYPEOF(x) != INTSXP)
> errorcall(call, _("argument 'x' must be raw, integer or logical"));
>
> It's obvious that some of the RAWSXP should be LGLSXP

Yes, thanks for the report. I'll fix it.

Duncan Murdoch



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Nov 21 21:59:51 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 21 Nov 2006 - 11:30:48 GMT.

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