Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
92 views

How to get a frame geometry on window resize using R and TCL/TK

I would like to scale an image according to the size of a frame that is not the toplevel, for that I'm trying to get the geometry of said frame and re-plot the image according to the results that will ...
Matheus Fernando's user avatar
0 votes
1 answer
239 views

Is there a way to specify tcltk version within R?

I was asked if I could "fix" the R script that was created in version 3.2.2 that ceased to work in version 4.2.2. The script turned out to be Tcl/tk interface using tcltk package. The script ...
aiorr's user avatar
  • 579
2 votes
0 answers
92 views

Having problems when starting a .R script using a button in a tkinter GUI

I'm currently working on a GUI for a R script I have written earlier. Since I have some experience in Python I decided to use tkinter for that. The GUI should mainly consist of a few entry-options and ...
Mr_Zebi_97's user avatar
0 votes
0 answers
805 views

TCL/TK support in R 4.1.1

I would like to have TLC/TK support in R 4.1.1 (on a Linux Ubuntu machine). What additional packages shall I install ? > capabilities() jpeg png tiff tcltk ...
Bogdan's user avatar
  • 365
1 vote
0 answers
63 views

Setting up TclArray in R

I am new to coding and I am trying to set up TclArray in R, so anytime users checks the checkbutton in GUI, TclArray will get input 0 or 1. The issues in my code occurs in value2, the code does not ...
Brijesh Patel's user avatar
0 votes
0 answers
88 views

R/Tcltk conditional file menu command assignment

I would like to, given certain conditions are met, to change the command of a menu function after it is created. Given the code: createMenu <- function(e) { topMenu <- tkmenu(e$wnd) ...
hkj447's user avatar
  • 737
3 votes
1 answer
504 views

R - Update text entry box (tkentry) based on value selected in dropdown (ttkcombobox)

I'm still quite new to R and tcltk / GUI programming. Here is a simple GUI and what I would like to happen is for the text entry box to change to a different value depending on what the user selects ...
Jimbo Mahoney's user avatar
4 votes
0 answers
875 views

Information about "Warning: no DISPLAY variable so Tk is not available" in shinyapps.io logs

I have deployed my shinyapp online and I am constantly checking my logs for possible problems. A warning message that often appears when some users connect to the platform is the following: Warning: ...
nd091680's user avatar
  • 605
1 vote
0 answers
74 views

combobox example: tk2list.configure could not be found

I am following A tk2combobox example from R tk2widgets examples. Executing these lines library(tcltk2) tt2 <- tktoplevel() cb <- tk2combobox(tt2) tkgrid(cb) ## Fill the ...
jlopez's user avatar
  • 347
1 vote
0 answers
1k views

Error “.onLoad failed in loadNamespace() for 'tcltk'”

I'm pretty new to R in Ubuntu. I am running R (3.5.0) in Rstudio 1.1.456 through Anaconda. The operating system is Ubuntu 18.04. In R studio I select the package Rcmdr: > library("Rcmdr", lib....
Bazman's user avatar
  • 2,140
0 votes
1 answer
241 views

How to access and modify a sibling of a Tcl/Tk object in R

In short: I use tcltk package in R. But non-R users may suggest ideas too and provide examples in other language than R. I have a list of Tcl/Tk objects in R <Tcl> .1.1.1.1 .1.1.1.2 .1.1.1.3 ...
GegznaV's user avatar
  • 5,530
4 votes
1 answer
156 views

R tkrplot layout issue

I've got a problem with extra space being put to the right and below plots made with tkrplot in R, as below. I've tried changing hscale and vscale, but all that does is magnify/reduce the overall size ...
Mike Dunlavey's user avatar
0 votes
1 answer
59 views

tk2combobox: how to control response to up/down arrow keys

I've got a UI in R using tk2combobox. If the control has focus, and I hit the "down-arrow" key, it expands the list, rather than changing the selection. It doesn't actually change the selection until ...
Mike Dunlavey's user avatar
0 votes
1 answer
508 views

Getting list of windows in Tk and destroying specific ones (R)

I was wondering if it is possible to get a list of windows in Tk, and destroy specific ones. I am working in R using the tcltk interface, and am calling a function written by someone else a long time ...
user avatar
0 votes
1 answer
500 views

Active window in R

I have a problem with R in Microsoft Windows. When I run a script from 'R console' (Rgui) with source('script_file'), and my script creates a graphic device, I use bringToTop() to switch the focus ...
Camillo Pieramati's user avatar
1 vote
1 answer
342 views

Filename in text box using tcltk in R

Using tcltk to create a GUI in R, I want to make a non-editable text box that displays the name of the save file that was selected by the user. I am able to create the button and the box, but I ...
Sam's user avatar
  • 69
3 votes
1 answer
635 views

Rstudio specific issue with the tcltk package

I am trying to compile an interactive code that prompts for user input. I used the tcltk package for various dialog boxes and everything seemed to work fine, until it stopped working today. It should ...
Ido Hatam's user avatar
  • 123
2 votes
0 answers
229 views

How to get geoR and sp R packages working in AWS Linux EC2 AMI

My end goal is to be able to use the geoR and sp packages in R on an AWS EC2 Linux instance. The first hurdle is getting an older version of R since 3.3 doesn't support TCL/TK (at least that I've ...
GISUser9's user avatar
  • 125
0 votes
0 answers
233 views

How to communicate with Shiny and TclTk widget in R

I am writing a program in Shiny, but I want to use TclTk for the beginning because it looks cleaner. I want to pass data that is gathered in TclTk to Shiny. I think I can do this by writing a CSV file ...
roru's user avatar
  • 11
0 votes
0 answers
49 views

R Unexpected line feed after tk_choose.dir

When using the folder picker tk_choose.dir from the tcltk module in R, I get intermittent and unexpected line feeds in the console afterward. Whatever I try to get rid of it, nothing works but ...
Ronald Bouwens PE2KMV's user avatar
0 votes
0 answers
67 views

set default filter in gfile open dialog

I am using gWidgets2tcltk to produce a simple gfile() open dialog with filter= to select only CSV files. How can I make this CSV filter the default filter? This almost does what I want: library(...
C8H10N4O2's user avatar
  • 19k
0 votes
2 answers
790 views

R tcltk: error when trying to display a png file depending on the OS

This is an issue I am encountering for different pieces of codes I am writing in R. Basically, I would like to generate a window that displays a picture (a .png file). Following for instance ...
P. Lamarche's user avatar
2 votes
2 answers
1k views

Returning variable from TclTk GUI in R

I've followed the TclTk example for creating a listbox to let the user choose their favorite fruit (see code below). The example prints the user's choice and that's it. However, I want to use that ...
jim616's user avatar
  • 523
1 vote
1 answer
498 views

How to maximize a window?

I have found a way to query whether a tk window is maximized: library(tcltk) w <- tktoplevel() tkwm.state(w) # Query the current state; returns "normal" if not maximized # The possible states ...
R Yoda's user avatar
  • 8,730
1 vote
0 answers
188 views

R with tcltk: Why should I add widgets to the parents env (environment) variable?

When creating GUIs with the R package tcltk it seems to be a best practice to add child widgets to the parent's environment stored in the env variable of the parent, e. g. library(tcltk) win2 <- ...
R Yoda's user avatar
  • 8,730
0 votes
1 answer
348 views

Hidden OK button because of window size in Tcl-tk

I have the following problem, described in the image above. Actually sometimes when I use my script the "OK" button shows, and not at other times when I use the script. If I make the window bigger ...
Joel H's user avatar
  • 183
3 votes
0 answers
303 views

How to control X11 windows grouping in R/tcltk

I am working on a GUI in R using tcltk and tcltk2 package. I have plenty of windows which are children of my main toplevel window called base. I want the windows manager to treat all children as ...
uselessconquest's user avatar
0 votes
1 answer
650 views

TCL error with "unfold" function in survival analysis

I am trying to use the unfold function from package RcmdrPlugin.survival. I used the following command: long.df <- unfold(testdf,time="deathint", event="death", cov=list(31:70,71:...
EdSeab's user avatar
  • 3
1 vote
1 answer
333 views

R tcltk responsive gui during calculation

Hello dear stack overflow community. i'm currently working on an R project for statistical calculations that involves a gui and also time consuming heuristics. in the gui shall be an button to start ...
hannes's user avatar
  • 11
2 votes
1 answer
1k views

R with tcltk/tcltk2: Improve slow performance when displaying big data.frame with TkTable?

Please see two edits below (added later)... I have loaded a big data.frame into memory (2.7 mio rows and 7 columns - 74 MB of RAM). If I want to view the data using Tcl/Tk's Tktable widget via the ...
R Yoda's user avatar
  • 8,730
0 votes
1 answer
575 views

R GUI with tcltk package: tkget() throws error when reading text property: "[tcl] bad option "get": must be cget or configure"

When I run a pure Tcl/Tk script I can read the text property of a label with the cget command: $ wish % label .lb -text "Read this" pack .lb .lb cget -text .lb % % Read this If I try to do this in R ...
R Yoda's user avatar
  • 8,730
1 vote
0 answers
754 views

R with tcltk: How to compile Tcl/Tk's "Img" package for Windows 64 Bit?

I am using R3.2.3 64 Bit Version on Windows 7. The R installation comes with Tcl/Tk and I can find some preinstalled Tcl/Tk packages (Tktable, dde1.3 and reg1.2) in the installation path: /R/R-3.2.3/...
R Yoda's user avatar
  • 8,730
0 votes
1 answer
198 views

R FAQ for package tcltk mentions "teacup". What is this and how can I use it?

In the R FAQ section 4.6 (Package TclTk does not work) I found the following sentence: ... although they [missing Tcl/tk packages] may be downloaded via the Teacup facility What is "teacup"? How ...
R Yoda's user avatar
  • 8,730
2 votes
1 answer
762 views

tcltk not loading and causes R-gui to become unresponsive or crash

I've run into a problem with getting tcltk to run properly on r-gui. It's a required package for one of the packages (aplpack) I'd like to work with. Preliminary Stuff 13" Macbook Air OSX Yosemite - ...
jrp355's user avatar
  • 83
0 votes
0 answers
548 views

In R tcltk, how to check whether a widget exists and replace it if it does?

I'm working on a tcltk interface in R that creates a set of drop down combo boxes based on the fields in whichever dataset is loaded by the user. Right now I have a button ("getbox") to press after ...
LM6's user avatar
  • 159
0 votes
1 answer
697 views

Can tkgrid() and tkpack() be used in the same function or window in R, or is there an alternative to tkframe()?

I'm creating a user interface using tcl/tk in R. I need to include several buttons and other widgets in a single top level window and I need to group some widgets into a container within the top level ...
LM6's user avatar
  • 159
4 votes
1 answer
2k views

Displaying data in a pop up window (table widget) using tcltk in R - why is it dropping the last row of data?

I'm struggling with creating a widget to view a table in a pop up window using tcl/tk. I'm following this example: http://r.789695.n4.nabble.com/Tck-tk-help-td1837711.html But when I run the script ...
LM6's user avatar
  • 159
0 votes
1 answer
271 views

Change tklabel to file name opened by tkbutton function in R

I am working on creating a widget in R that can open a file and show the characteristics of that file within the same widget. I want this information to be updated automatically when loading the file. ...
geotics's user avatar
  • 61
1 vote
1 answer
61 views

Tcl/Tk Referencing user-selected values in script

A quick question regarding Tcl/Tk and R. Below I have a slice of code that corresponds with a Tk button that executes the ToDo<-function(){...}. My presumption is that both summary.myData() and ...
Bluebird's user avatar
  • 531
1 vote
1 answer
764 views

getting values in R from tkentry() widgets

I'm trying to create a small interactive window in which user (for now me) can enter specific information regarding power calculations (test name, number of groups, type of data) in order to perform ...
Rudolf Talens's user avatar
0 votes
1 answer
239 views

tcltk R - how to access value returned by function

I just started with tcltk and R. And I am having troubles accessing a computed value by a function called myFun1 when calling a second function myFun2: Here is a simplified version of my UI: Simple ...
maRtin's user avatar
  • 6,476
0 votes
1 answer
480 views

tkprogressbar doesn't fit the window

I am programming a GUI and want to use a progress bar. My code: load <- function(x,y){ k <- 10 bar <- tkProgressBar(title = "Bla ...", label = "Progress", ...
Leoncia's user avatar
0 votes
0 answers
470 views

Extracting value from tcl Tk Widget

For the below code, I want to extract the value of fruitChoice as a character instead of the message box so that it can be used as an input in R script. Can you please advice what will be the way to ...
user3719268's user avatar
0 votes
1 answer
1k views

How to center a toplevel window in R / tcltk

I'm new to R and tcltk. I use tcltk to create a window. Every time I call tktoplevel(), the new window appear at top left of the screen, and I have to move it myself every time. I know how to ...
boat's user avatar
  • 13
16 votes
7 answers
38k views

Error ".onLoad failed in loadNamespace() for 'tcltk'"

I have a general question about how to effectively load any kind of external package into R. I have found that many sources detailing this information are simply insufficient, but I will leave out ...
warship's user avatar
  • 3,014
2 votes
1 answer
804 views

R tcl tk: How do I pass a variable to a button command?

How would I pass the value of num in a command function of a button? f.frame <- tktoplevel() numIDs = 50; bs = list(); OnPress <- function (inum) { print (inum) } for (num in 1:numIDs) { ...
gaitat's user avatar
  • 12.6k
1 vote
1 answer
156 views

R tcltk: How to add buttons in array

This code will produce 50 buttons. I would like to put them in an array so I can reference them later and change their attribute based on some condition. My code is as follows: numIDs = 50; bs = ...
gaitat's user avatar
  • 12.6k
1 vote
0 answers
303 views

How to run tcl code in r

I have used SpecTcl which a WYSIWYG GUI-Builder for Tcl/Tk (http://sourceforge.net/projects/spectcl/) to create a gui, which has the output as tcl code. How can I use this gui in R script?
user avatar
0 votes
1 answer
382 views

R tcltk horizontal row of buttons

This code will produce a vertical list of buttons. How do I create a horizontal list of buttons each having a different command function? f.frame <- tkframe (w.top) for(i in 1:10) tkpack (...
gaitat's user avatar
  • 12.6k
2 votes
1 answer
105 views

R Tcl/Tk: OnReset not working after OnSubmit

In the following code I would like to reset the entry fields, but once I hit the Submit button, I can not reset them any more. If I do Reset before the Submit button then everything is ok. What am I ...
gaitat's user avatar
  • 12.6k