Dear all R users, I have a query on "Edit" function. Suppose I have a data frame named "data". I can use EDIT function to see the materials contained in data, by using the command: > edit(data) But when I close the window then again the materials contained in data is displayed in the command window. But I do not want to see these materials again. Can anyone give me any idea on how to do this? Thanks and regards, stat Send instant messages to your online friends http://in.messenger.yahoo.com Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/ [[alternative HTML version deleted]]
On Wed, 7 Jun 2006, stat stat wrote:> Dear all R users, > > I have a query on "Edit" function. Suppose I have a data frame named > "data". I can use EDIT function to see the materials contained in data, > by using the command: > > > edit(data) > > But when I close the window then again the materials contained in data > is displayed in the command window. But I do not want to see these > materials again. Can anyone give me any idea on how to do this??invisible> > Thanks and regards, > stat-- 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
fix(data) will invoke edit(data) and store changes you make in data without displaying anything. stat stat schrieb:> Dear all R users, > > I have a query on "Edit" function. Suppose I have a data frame named "data". I can use EDIT function to see the materials contained in data, by using the command: > > > edit(data) > > But when I close the window then again the materials contained in data is displayed in the command window. But I do not want to see these materials again. Can anyone give me any idea on how to do this? > > Thanks and regards, > stat > > Send instant messages to your online friends http://in.messenger.yahoo.com > > Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/ > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > >
If you want to change the data,_fix_ will be a good option.But if you just want to browse the data ,then invisible(edit(data)) is better one. I remember this question showed up some time ago. 2006/6/7, Ulrich Keller <uhkeller at web.de>:> fix(data) > > will invoke edit(data) and store changes you make in data without > displaying anything. > > stat stat schrieb: > > Dear all R users, > > > > I have a query on "Edit" function. Suppose I have a data frame named "data". I can use EDIT function to see the materials contained in data, by using the command: > > > > > edit(data) > > > > But when I close the window then again the materials contained in data is displayed in the command window. But I do not want to see these materials again. Can anyone give me any idea on how to do this? > > > > Thanks and regards, > > stat > > > > Send instant messages to your online friends http://in.messenger.yahoo.com > > > > Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/ > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > > > > > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-- ronggui huang Deparment of Sociology Fudan University
I use a simple-minded, dirty wrapper on edit: view <- function(x) { warnopt <- options()$warn options(warn=-1) on.exit({sink(); options(warn=warnopt)}) edit(x) invisible() } I say "dirty", because sometimes the output is re-directed from stdout somewhere else as an unintended side effect, which is why I have the first sink() statement in there. (Note the help file on sink() advises in numerous places on using sink()-related calls with care.) I have not been ambitious enough to make the above version robust and well-understood, as it works well for me nearly every time, and when it does not, the side effect and cleanup is neither damaging nor annoying enough. Also, I have only really used this under Windows R GUI. Hope that helps, Bill ------------------------------- Bill Pikounis, PhD Nonclinical Statistics Centocor, Inc.> > edit(data) > > But when I close the window then again the materials > contained in data is displayed in the command window. But I > do not want to see these materials again. Can anyone give me > any idea on how to do this?Hope that helps, Bill> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of stat stat > Sent: Wednesday, June 07, 2006 8:36 AM > To: r-help at stat.math.ethz.ch > Subject: [R] Edit function > > > Dear all R users, > > I have a query on "Edit" function. Suppose I have a data > frame named "data". I can use EDIT function to see the > materials contained in data, by using the command: > > > edit(data) > > But when I close the window then again the materials > contained in data is displayed in the command window. But I > do not want to see these materials again. Can anyone give me > any idea on how to do this? > > Thanks and regards, > stat > > Send instant messages to your online friendshttp://in.messenger.yahoo.com Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/ [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html