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

peter dalgaard pdalgd at gmail.com
Thu Oct 22 11:17:34 CEST 2015


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



More information about the R-help mailing list