[R] reading 2-byte integers using readBin and connections

Thomas Lumley tlumley at u.washington.edu
Tue Mar 5 01:57:18 CET 2002


On Mon, 4 Mar 2002, Prasad, Rajiv wrote:

>
> What is the data type corresponding to short int?  ?readBin lists "numeric",
> "double", "integer", "int", "logical", "complex", and "character" as the
> data types -- nothing that seems like a "short".
>

There is a size= option described in ?readBin
    size: integer.  The number of bytes per element in the byte stream.
           The default, `NA', uses the natural size.  Size changing is
           not supported for complex vectors.

That looks as though it should help.

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list