[Rd] Data Entry Editor

Prof Brian D Ripley ripley@stats.ox.ac.uk
Sat, 6 May 2000 11:11:58 +0100 (BST)


On Sat, 6 May 2000, Uwe Ligges wrote:

> Prof Brian D Ripley wrote:
> 
> > > > I would be particularly interested in comments on the new data entry
> > > > editor (used by fix/edit on data frames).  This is still work in progress
> > > > (in parallel with changes on X11).
> > > > [...]
> > > > A data entry editor is now implemented.  This is similar to the Unix
> > > > one (see ?dataentry) with the additional feature that right-clicking
> > > > in a cell turns it into an editable field (entered as a new value
> > > > by navigating away from the cell).
> > 
> > data.entry on Unix has lots of quirks.  Thanks for the comments: as I
> > said, this is work in progress, and based on some already flaky code.
> 
> I know. My intention was to point out some of these "quirks".
> The Editor will be very useful and already is a _great_ tool for simple
> data editing.
> 
> Looks like I should tell something like this more gracefully, but my
> english too bad...
> 
> 
> > > - Using data.entry() on a existing matrix, list or data.frame, unnamed
> > > columns after that are named "var1", "var2", etc.
> > 
> > I don't see that here.
> 
> Example:
> 
>  x <- matrix(1:6, nrow=2)
>  x
> 
>      [,1] [,2] [,3]
> [1,]    1    3    5
> [2,]    2    4    6
> 
>  data.edit(x)
>  ## Closing the editor without modifications:
>  x
> 
>      var1 var2 var3
> [1,]    1    3    5
> [2,]    2    4    6

Oh, I see, the names in the returned object. That's intentional.
As dara frames cannot have unnamed columns in R objects, I thought
you meant unnamed in the data editor.

> > > - data.entry() does not work with all data.frames, e.g.:
> > >
> > >    x <- data.frame(1:2, c("A", "B"))
> > >    data.entry(x)
> > >  Error in de.ncols(sdata) : wrong argument to dataentry
> > 
> > You should use edit and not data.entry with data frames.  That one is wrong
> > on Unix too.
> 
> So have a look at this:
>  
>  x <- data.frame(1:2, c("A", "B"))
>  edit(x) ## same as:  edit.data.frame(x)
>  ## Click into [3, 1]
> 
> R crashes...

I have already said there is a problem with that pre-version that the
double-click interval is set wrongly, so it normally thinks you have
double-clicked before selecting the cell. The problem is the clicking, not
being a data frame.

I'll put up a new version in a day or two.  Already there are lots of
extra features, for example variable-width (and re-sizeable) columns.

Brian

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._