Hi Folks, The spreadsheet-like layout displayed when 'data.entry' is invoked is very useful simply for legible display of data, quite apart from its intended use for the purpose of entering or editing data. If one wants to use it _simply_ as a display device, so that one can look around inside a data-set while working on it, then it is not a good idea to have its _editing_ capabilities active: this is dangerous, since an inadvertent keystroke could change the data. So: is there a way to invoke 'data.entry' in "read-only" mode? Or some other function with equivalent display which can be run "read-only"? [Bonus question: is there a way to change its cosmetics, e.g. background colour, font, ... ?] With thanks, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 12-Jan-04 Time: 20:19:58 ------------------------------ XFMail ------------------------------
There are I believe three separate data displays behind data.entry (on Xll, Windows and Aqua). As far as I know none of them allow much customization, or to be read-only. I had thought about a read-only version of the first two, but then realized that people happily use spreadsheets for display, as well as data editors in several other packages. What is more important is that the data editors are modal (at least the first two), so you cannot leave them open whilst working on a dataset, since you will not be able to get back to the prompt. Read-only non-modal versions might be worth pursuing. On Mon, 12 Jan 2004 Ted.Harding at nessie.mcc.ac.uk wrote:> Hi Folks, > > The spreadsheet-like layout displayed when 'data.entry' is > invoked is very useful simply for legible display of data, > quite apart from its intended use for the purpose of entering > or editing data. > > If one wants to use it _simply_ as a display device, so that > one can look around inside a data-set while working on it, > then it is not a good idea to have its _editing_ capabilities > active: this is dangerous, since an inadvertent keystroke > could change the data. > > So: is there a way to invoke 'data.entry' in "read-only" > mode? Or some other function with equivalent display which > can be run "read-only"? > > [Bonus question: is there a way to change its cosmetics, > e.g. background colour, font, ... ?] > > With thanks, > Ted.-- 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
Dear Ted, edit(df) invokes data.entry() on the data frame df and returns the edited version without altering the original. Thus df <- edit(df) [or fix(df)] actually to change df, or invisible(edit(df)), or something equivalent, simply to look (and discard changes if they are made). I hope that this helps, John At 08:19 PM 1/12/2004 +0000, you wrote:>Hi Folks, > >The spreadsheet-like layout displayed when 'data.entry' is >invoked is very useful simply for legible display of data, >quite apart from its intended use for the purpose of entering >or editing data. > >If one wants to use it _simply_ as a display device, so that >one can look around inside a data-set while working on it, >then it is not a good idea to have its _editing_ capabilities >active: this is dangerous, since an inadvertent keystroke >could change the data. > >So: is there a way to invoke 'data.entry' in "read-only" >mode? Or some other function with equivalent display which >can be run "read-only"? > >[Bonus question: is there a way to change its cosmetics, > e.g. background colour, font, ... ?] > >With thanks, >Ted. > > >-------------------------------------------------------------------- >E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> >Fax-to-email: +44 (0)870 167 1972 >Date: 12-Jan-04 Time: 20:19:58 >------------------------------ XFMail ------------------------------ > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html____________________________ John Fox Department of Sociology McMaster University email: jfox at mcmaster.ca web: http://www.socsci.mcmaster.ca/jfox
The function showData() in the relimp package does something like this (and has a go at your bonus question), in a Tk widget. It's far from a polished product, but gives some idea of what can be done using the tcltk package. Usage is, for example, data(trees) showData(trees) It will be very slow with very large datasets, but fine for smaller ones. I just discovered, though, that showData() has at least one serious bug, arising from changes (quite a while ago now! I should have mended this earlier) in the tcltk package. I'll put a new version of relimp on CRAN soon, and in the meantime I have put a fixed version of showData() at http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/ software/relimp/showdata.r -- In case it's of use. David On Monday, Jan 12, 2004, at 20:19 Europe/London, (Ted Harding) wrote:> Hi Folks, > > The spreadsheet-like layout displayed when 'data.entry' is > invoked is very useful simply for legible display of data, > quite apart from its intended use for the purpose of entering > or editing data. > > If one wants to use it _simply_ as a display device, so that > one can look around inside a data-set while working on it, > then it is not a good idea to have its _editing_ capabilities > active: this is dangerous, since an inadvertent keystroke > could change the data. > > So: is there a way to invoke 'data.entry' in "read-only" > mode? Or some other function with equivalent display which > can be run "read-only"? > > [Bonus question: is there a way to change its cosmetics, > e.g. background colour, font, ... ?] > > With thanks, > Ted. > > > -------------------------------------------------------------------- > E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> > Fax-to-email: +44 (0)870 167 1972 > Date: 12-Jan-04 Time: 20:19:58 > ------------------------------ XFMail ------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html