Dear R project officials, I have found that in R 3.0.1 version "writeBin" function of "base" package might not work correctly. For command writeBin("100",raw()) it answers "31 30 30 00" the last double 0 is differs from http://www.branah.com/ascii-converter there ascii codes are "31 30 30". So is it normal having double 0-s after ascii codes and what it means? Thank you in advance. Regards, Harutyun Khachatryan.
On 06/11/2013 3:35 AM, Harutyun Khachatryan wrote:> Dear R project officials, > > I have found that in R 3.0.1 version "writeBin" function of "base" package might not work correctly. For command writeBin("100",raw()) it answers "31 30 30 00" the last double 0 is differs from http://www.branah.com/ascii-converter there ascii codes are "31 30 30". So is it normal having double 0-s after ascii codes and what it means? >From ?writeBin: "|readBin| and |writeBin| read and write C-style zero-terminated character strings." Duncan Murdoch
First of all, use "readBin" to verify you get the desired data back. Second, that '00' is, I believe the <EOF> character you'll find at the end of any file. Harutyun Khachatryan wrote> Dear R project officials, > > I have found that in R 3.0.1 version "writeBin" function of "base" package > might not work correctly. For command writeBin("100",raw()) it answers "31 > 30 30 00" the last double 0 is differs from > http://www.branah.com/ascii-converter there ascii codes are "31 30 30". So > is it normal having double 0-s after ascii codes and what it means?-- View this message in context: http://r.789695.n4.nabble.com/WriteBin-problem-tp4679853p4679855.html Sent from the R help mailing list archive at Nabble.com.