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

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri May 9 14:39:56 MEST 2003


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 at pair.com wrote:

> On Fri, 09 May 2003 11:34:08 +0300, Bernd Ebersberger
> <bernd.ebersberger at vtt.fi> wrote:
> 
> >dear R-tists,
> >
> >i am experiencing a problem with the data editor in the windows version of 
> >R 1.6.1 envoked with the command 'fix'.
> >
> >the data editor changes the size of large data frames.
> 
> 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
> 
> >a simple example illustrates this:
> >
> >-------------------------------------------------------
> >
> > > dfrm <- data.frame(no=c(1:100000))
> > > length(dfrm[,1])
> >
> >[1] 100000
> >
> > > fix(dfrm)
> >
> > > length(dfrm[,1])
> >
> >[1] 34464
> >
> >--------------------------------------------------------
> >
> >
> >does anybody have a quick remedy for this?
> >
> >i am not sure whether it is worth putting much developmental effort in 
> >solving this particular problem.
> >
> >however, i believe that one should be aware of it when working with large 
> >data sets.
> >
> >
> >greetings from the northern edge of europe.
> >
> >bernd.
> 
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list