> Once you're up to speed on those issues...Any suggestions for getting up to speed on those issues? On Thu, Jan 21, 2016 at 11:46 AM, peter dalgaard <pdalgd at gmail.com> wrote:> > > On 21 Jan 2016, at 00:25 , Dalthorp, Daniel <ddalthorp at usgs.gov> 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 <pdalgd at gmail.com> > wrote: > > > > > On 19 Jan 2016, at 20:48 , Dalthorp, Daniel <ddalthorp at 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 > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > 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 > > > > -- > 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 > > > > > > > > > >-- 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]]
I have written some content about the R bindings to Tcl and Tk: http://waddella.github.io/loon/learn_R_tcltk.html And the pack geometry manager http://adrian.waddell.ch/EssentialSoftware/Rtcltk_geometry.pdf But if you have no experience with building graphical user interfaces then you might want to look into a book on Tk. "Effective TCL/TK programming" by Harrison and McLennan is a good one. Greetings, Adrian On Jan 21, 2016 10:36 PM, "Dalthorp, Daniel" <ddalthorp at usgs.gov> wrote:> > Once you're up to speed on those issues... > > Any suggestions for getting up to speed on those issues? > > > > On Thu, Jan 21, 2016 at 11:46 AM, peter dalgaard <pdalgd at gmail.com> wrote: > > > > > > On 21 Jan 2016, at 00:25 , Dalthorp, Daniel <ddalthorp at usgs.gov> > 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 <pdalgd at gmail.com> > > wrote: > > > > > > > On 19 Jan 2016, at 20:48 , Dalthorp, Daniel <ddalthorp at 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 > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > 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 > > > > > > > -- > > 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 > > > > > > > > > > > > > > > > > > > > > > > -- > 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. >[[alternative HTML version deleted]]
Thanks, Adrian...the discussions about R bindings to Tcl and Tk look very helpful! -Dan On Fri, Jan 22, 2016 at 2:49 AM, Adrian Waddell <adrian.waddell at gmail.com> wrote:> I have written some content about the R bindings to Tcl and Tk: > > http://waddella.github.io/loon/learn_R_tcltk.html > > And the pack geometry manager > > http://adrian.waddell.ch/EssentialSoftware/Rtcltk_geometry.pdf > > But if you have no experience with building graphical user interfaces then > you might want to look into a book on Tk. "Effective TCL/TK programming" by > Harrison and McLennan is a good one. > > Greetings, > > Adrian > On Jan 21, 2016 10:36 PM, "Dalthorp, Daniel" <ddalthorp at usgs.gov> wrote: > >> > Once you're up to speed on those issues... >> >> Any suggestions for getting up to speed on those issues? >> >> >> >> On Thu, Jan 21, 2016 at 11:46 AM, peter dalgaard <pdalgd at gmail.com> >> wrote: >> >> > >> > > On 21 Jan 2016, at 00:25 , Dalthorp, Daniel <ddalthorp at usgs.gov> >> 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 <pdalgd at gmail.com> >> > wrote: >> > > >> > > > On 19 Jan 2016, at 20:48 , Dalthorp, Daniel <ddalthorp at 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 >> > > > 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 >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > -- >> > > 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 >> > > >> > >> > -- >> > 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 >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> >> >> -- >> 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. >> >-- 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]]
Good pointers, although R bindings document is not quite getting into the really messy bits. I think Daniel may be at a point where he needs to study the code snippets that he has got to work and figure out why and how they work. The help(TclInterface) page is the most definitive documentation for this, although it is admittedly rather dense (in both senses). E.g., it is hardly obvious that it is the distinction between string objects and lists of length one that decides whether Tcl displays stuff in braces.... (That particular point is something that I probably could patch up when/if I get a spare moment.) -pd> On 22 Jan 2016, at 11:49 , Adrian Waddell <adrian.waddell at gmail.com> wrote: > > I have written some content about the R bindings to Tcl and Tk: > > http://waddella.github.io/loon/learn_R_tcltk.html > > And the pack geometry manager > > http://adrian.waddell.ch/EssentialSoftware/Rtcltk_geometry.pdf > > But if you have no experience with building graphical user interfaces then you might want to look into a book on Tk. "Effective TCL/TK programming" by Harrison and McLennan is a good one. > > Greetings, > > Adrian > > On Jan 21, 2016 10:36 PM, "Dalthorp, Daniel" <ddalthorp at usgs.gov> wrote: > > Once you're up to speed on those issues... > > Any suggestions for getting up to speed on those issues? > > > > On Thu, Jan 21, 2016 at 11:46 AM, peter dalgaard <pdalgd at gmail.com> wrote: > > > > > > On 21 Jan 2016, at 00:25 , Dalthorp, Daniel <ddalthorp at usgs.gov> 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 <pdalgd at gmail.com> > > wrote: > > > > > > > On 19 Jan 2016, at 20:48 , Dalthorp, Daniel <ddalthorp at 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 > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > 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 > > > > > > > -- > > 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 > > > > > > > > > > > > > > > > > > > > > > > -- > 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