[R] tcltk: write '[' and ']' in a table cell

peter dalgaard pdalgd at gmail.com
Thu Jan 21 21:08:14 CET 2016


“Right now I’m having amnesia and déjà vu at the same time. I think I’ve forgotten this before.” ― Steven Wright

Check if this might be the same issue as the one of embedded spaces in

https://stat.ethz.ch/pipermail/r-help/2009-January/378558.html

-pd

> On 21 Jan 2016, at 02:12 , Dalthorp, Daniel <ddalthorp at usgs.gov> wrote:
> 
> I know it should not be difficult to write the string:
> 
> i<-4
> j<-17
> lbl<-paste0("[", i, ", ", j, "]")
> 
> # to a table, but I'm having a devil of a time trying to figure out how to
> do it.
> # the following gives lbl surrounded by braces.
> 
> tt<-tktoplevel()
> tfr <- tkframe(tt)
> tkgrid(tfr)
> junk<-tclArray()
> junk[[0,0]]<-lbl
> table1<-tkwidget(tfr,"table", rows=1, cols=1, variable=junk)
> tkgrid(table1)
> 
> 
> How to write without the braces?
> 
> Any quick suggestions would be very much appreciated...I've burned much
> time trying to figure this should-be-simple problem out.
> 
> Thanks!
> 
> 
> 
> -- 
> Dan Dalthorp, PhD
> USGS Forest and Rangeland Ecosystem Science Center
> Forest Sciences Lab, Rm 189
> 3200 SW Jefferson Way
> Corvallis, OR 97331
> ph: 541-750-0953
> ddalthorp at usgs.gov
> 
> 	[[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