Thanks, Peter. I'm sure that's right, but it requires knowing: (1) that there's something called the "width subcommand", and (2) how to format the call to that command/subcommand.
I was able to do it eventually but only after a few hours of effort searching the web for help. E.g. with a table (called table1) with 3 columns and want to set widths to 30, 5, and 5: colwidths<-c(30, 5, 5) for(i in 1:3) { tcl(table1, "width", i - 1, colwidths[i]) } On Wed, Jan 20, 2016 at 3:07 PM, peter dalgaard <pda...@gmail.com> wrote: > > > On 19 Jan 2016, at 20:48 , Dalthorp, Daniel <ddalth...@usgs.gov> wrote: > > > > Does anyone know a simple way to create a tcltk table with columns of > > varying widths? > > Create a table, then set the width of the columns with the width > subcommand? > > -pd > > > pathName width ?col? ?value col value ...? If no col is specified, returns > a list describing all cols for which a width has been set. If col is > specified with no value, it prints out the width of that col in characters > (positive number) or pixels (negative number). If one or more col-value > pairs are specified, then it sets each col to be that width in characters > (positive number) or pixels (negative number). If value is default, then > the col uses the default width, specified by -colwidth. > > > > > > > -Dan > > > > > > > > -- > > 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 > > ddalth...@usgs.gov > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@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....@cbs.dk Priv: pda...@gmail.com > > > > > > > > > > -- 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 ddalth...@usgs.gov [[alternative HTML version deleted]] ______________________________________________ R-help@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.