From p.dalgaard at biostat.ku.dk  Mon Sep  1 23:55:58 2003
From: p.dalgaard at biostat.ku.dk (p.dalgaard@biostat.ku.dk)
Date: Mon Sep  1 22:55:37 2003
Subject: [Rd] Re: [R] File Reading Problem (PR#4044)
Message-ID: <200309012055.h81KtwJH001778@pubhealth.ku.dk>

Duncan Murdoch <dmurdoch@pair.com> writes:

> On Mon, 1 Sep 2003 14:26:43 -0700, "Jiming Yu"
> <jimingyu@princeton.edu> wrote:
> 
> >Dear all,
> >    I am trying to read characters byte by byte(in their ASCII codes) from a
> >file
> 
> I was going to suggest using readBin, but there seems to be a bug:
> 
> > con <- file('c:/test.txt','rb')
> > readBin(con,'c',15,1)
> stack imbalance in internal readBin, 9 then 8stack imbalance in
> .Internal, 8 then 7
> stack imbalance in {, 6 then 5
> NULL
> Error: unprotect(): stack imbalance
> 
> This was in today's r-devel build for Windows, but the bug also shows
> up in 1.7.1.  I'll look into it.

It's not unique to windows:

> con <- file('FAQ','rb')
> readBin(con,'c',15,1)
stack imbalance in internal readBin, 9 then 8stack imbalance in
> .Internal, 8 then 7
stack imbalance in {, 6 then 5
NULL
Error: unprotect(): stack imbalance


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] Re: [R] File Reading Problem (PR#4044)
p.dalgaard@biostat.ku.dk