> On 21 Jan 2016, at 00:25 , Dalthorp, Daniel <[email protected]> wrote: > > 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. >
Yes, there's a fair amount of that going on with the tcltk interface. You need to both grasp the rules for passing arguments to the underlying Tcl command, and know how to find and read the Tcl/Tk documentation. Once you're up to speed on those issues it's not all that hard to find stuff in (for the present case), say, http://tktable.sourceforge.net/tktable/doc/tkTable.html The situation may be unfortunate, but the alternative is for "someone" to sit down an convert all relevant Tcl/Tk documentation to R help files. -pd > 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 <[email protected]> wrote: > > > On 19 Jan 2016, at 20:48 , Dalthorp, Daniel <[email protected]> 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 > > [email protected] > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > [email protected] 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: [email protected] Priv: [email protected] > > > > > > > > > > > > > -- > 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 > [email protected] > -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: [email protected] Priv: [email protected] ______________________________________________ [email protected] 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.

