Skip to content

windows data editor changes dimensions displayed data frames (PR#2962)

3 messages · Brian Ripley, Duncan Murdoch

#
On Fri, 09 May 2003 11:34:08 +0300, Bernd Ebersberger
<bernd.ebersberger@vtt.fi> wrote:

            
I can confirm this in the current R-patched.  I'll take a look.  It
might be that some limitation to the code means you won't be able to
edit big data frames (it looks like somewhere it's using a 16 bit row
count), but it certainly shouldn't silently change things.

Duncan Murdoch
#
It's computing lengths mod 2^16.  The issue is in the design, which uses
LEVELS to store the current length of the column:

   The vectors are created too long and if they need to be increased
   this is done by using the next higher power of 2. They start 100
   long. To cut them to the correct length for return you need to know
   the largest row number that was assigned to. LEVELS (sxpinfo.gp) is
   used to keep track of this, separately for each vector.

This is a 16-bit field, so the length of each vector is limited to 65535.

It looks to be tricky to change this, either to track each change of 
length in the code or to keep a separate counter (as pairlists are used).
On Fri, 9 May 2003 dmurdoch@pair.com wrote:

            

  
    
2 days later
#
On Fri, 9 May 2003 13:05:54 +0200 (MET DST), you wrote:

            
This has now been fixed in the latest R-patched (to become 1.7.1).
Brian Ripley put in a test to limit it to spreadsheets with 65535
rows.  A Windows binary will be available soon on my web page
(http://www.stats.uwo.ca/faculty/murdoch/software/r-devel).

I believe R-devel (to become 1.8.0) will remove the size limit, but I
don't have a current version compiled just yet.

I have also put a fix into R-patched for the problem reported by Tao
Shi in R-help about R not shutting down properly.  

Duncan Murdoch