[R] Bytes to Numeric/Float conversion

Henrik Bengtsson hb at biostat.ucsf.edu
Tue Jun 11 23:21:19 CEST 2013


On Tue, Jun 11, 2013 at 2:14 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
> On Jun 11, 2013, at 9:01 AM, Bikash Agrawal wrote:
>
>> Is there any packages available in R, that can convert Bytes array to Float.
>> Using rJava we can do it. But it is kind of slow. Is there any R
>> specific packages.
>> I am having problem converting my bytes array to floating point.
>> Could any one help me with this problem.
>
> There is a raw data type that is designed to hold bytes than can be indexed.
>
> ?raw

...and then ?readBin

/Henrik
>
> `scan` can read files of type raw
>
> ?scan
>
> --
>
> David Winsemius
> Alameda, CA, USA
>
> ______________________________________________
> R-help at r-project.org 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.



More information about the R-help mailing list