[R] Get the output of a function in R GUI

Jesús Para Fernández j.para.fernandez at hotmail.com
Thu Oct 22 11:24:07 CEST 2015


Thanks, but just one more question

How can I catch the response and put it on a tktext?

Imagien there is a function that the response is an error, how can i catch this error and manage it?

Thanks!

> From: pdalgd at gmail.com
> Subject: Re: [R] Get the output of a function in R GUI
> Date: Thu, 22 Oct 2015 11:17:34 +0200
> CC: r-help at r-project.org
> To: j.para.fernandez at hotmail.com
> 
> 
> On 22 Oct 2015, at 10:49 , Jesús Para Fernández <j.para.fernandez at hotmail.com> wrote:
> 
> > Hi,
> > 
> > I want to create my own RGUI, so I�m using tcltk for that. 
> > 
> > In a very simple example, I want to get the response of a function into a tktext, so I have done this:
> > data<-c(2,3,5,2)
> > tt<-tktoplevel
> > text<-tktext(tt)
> > tkpack(text)
> > sum(data)
> > 
> > How can I get the output of sum(data) in my tktext??
> 
> 
> For instance with
> 
> tkinsert(text, "end", sum(data))
> 
> However, you need to reach out for a Tcl/Tk reference manual to sort out the mysteries of the index argument and of the widget subcommands in general.
> 
> -pd
> 
> > 
> > Thanks!
> > Jes�s 
> > 		 	   		  
> > 	[[alternative HTML version deleted]]
> > 
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> 
> -- 
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
 		 	   		  
	[[alternative HTML version deleted]]



More information about the R-help mailing list