Re: [R] Edit function

From: Pikounis, Bill [CNTUS] <BPikouni_at_cntus.jnj.com>
Date: Thu 08 Jun 2006 - 01:53:32 EST


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@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch]On Behalf Of stat stat
> Sent: Wednesday, June 07, 2006 8:36 AM
> To: r-help@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 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@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@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 Received on Thu Jun 08 05:26:05 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 08 Jun 2006 - 06:10:55 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.