similar to: curious code mistakes

Displaying 20 results from an estimated 2000 matches similar to: "curious code mistakes"

2002 Sep 26
3
tcltk - command=function()
hi, just having the idea create a simple tcl/tk gui-dialog for different data-file formats i get starting problems and it would be nice get some tips/tricks from experienced tcl/tk user in R ! tt <- tktoplevel() label.widget <- tklabel(tt,text="Decision Tree GUI") button.widget <- tkbutton(tt,text="Select SPSSFile", command=function()
2007 Jul 05
4
Me again, about the horrible documentation of tcltk
How on Earth can I know what are the arguments of any of the functions of the tcl/tk package? I tried hard to find, using all search engines available, looking deep into keywords of R, python's tkinter and tcl/tk, but nowhere I found anything remotely similar to a help. For example, what are the possible arguments to tkgetOpenFile? I know that this works: library(tcltk) filename <-
2003 Apr 24
3
R TclTk Examples
Hi, I've been learning how to use R TclTk in Windows over the last few months. I have recently put together a collection of examples of some common widgets and their corresponding R code, at http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/ I would be interested in any feedback - Is it useful? Does it contain any significant errors or bad coding style? Does anyone else want to
2008 Oct 22
0
Bug when importing datas with tcltk window (PR#13191)
Full_Name: PREUSS Bastien Version: R version 2.6.2 (2008-02-08) OS: mingw32 Submission from: (NULL) (193.51.249.166) Hello, I wrote a small function using tcltk to import my datasets. When I use it, both the tcltk and the R windows closed themselves. I don't understand why. What is surprising is that it doesn?t happen each time. Most of the time I can't finish the importation of my 3
2008 Sep 17
1
trouble with tkgetOpenFile
I'm trying to use the following loop to open a window multiple times to select files, but only the last window shows up. What am I missing? library(tcltk) nWin <- 6 fn <- vector('list', nWin) for (ii in nWin) { fn[[ii]] <- tclvalue( tkgetOpenFile( filetypes = "{{Files} {.1D}} {{All files} *}", title = paste('Choose number', ii, 'time
2009 Oct 19
1
Problem with geometry manager in TclTK
Hello, everyone. I have the following problem with TclTk: I create some windows and want to change their position with geometry manage (sometimes they will be centered, sometimes not). If the toplevel is created and its dimensions are gathered via 'tkwinfo', I get (usually) correct values. However, if this window is created by a function (in the following example, by 'ask.format')
2008 Aug 19
1
Open directory within a menu in tcltk
Hello, I am trying to setup a menu to open files and directories. I have the following code: opendir<-function() { dirname<<-tclvalue(tkchooseDirectory()) } openfile<-function() { filename<<-tclvalue(tkgetOpenFile()) } require(tcltk) t1<-tktoplevel() topMenu<-tkmenu(t1) tkconfigure(t1,menu=topMenu) plotMenu<-tkmenu(topMenu, tearoff=FALSE)
2008 Aug 11
3
tkentry that exits after RETURN?
I can set up an entry widget (thanks to an old post by Barry Rowlingson) that gets a password and exits when the user clicks on the "OK" button. Anyone have any clever ideas for returning/ destroying the window when the user types a carriage return/ENTER in the text window? I've messed around a little with validate, validatecommand, but don't see any obvious way to do it ...
2003 Oct 09
0
curious mistake in tkradiobutton
Hello, the following code produces an error when executing it, it is a code that produces 6 checkbutton that at the beginning are empty, when selecting the first checkbox he says that doesn't know the second variable tcl, he say: [1] "1" Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk"), class = "tclObj") : [tcl] can't
2003 Sep 08
1
add checkbutton and the variable(wrong length of vector "b")
Hello it wanted to add a boton of checkup in a menu, ?How I do to create so many variables as checkbutton? I try with the code that continues, use a vector that is charged dynamicamente while I open files but the component of vector "b" is associates with a Tcl variable and load 3 components (environment, value and pointer) I wanted alone to charge the value (0 done not select
2008 Apr 15
2
How can I import user-defined missings from Spss?
Hi, It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get). But no matter which way I do import the data, user-defined missings from Spss are always lost. (it makes no difference if there are a single value, a range, or any combination of them. They are always ignored). Is there any way in R to find out if any value was user-defined missing
2012 May 03
2
Help with readBin
I'm trying to read a binary file created by a fortran code using readBin and readChar. Everything reads fine (integers and strings) except for double precision numbers, they are read as huge or very small number (1E-250,...). I tried various endianness, swap, But nothing has worked so far. I also tried on R 64 bit for linux and windows (R 2.14) and R 2.11 on windows XP 32 bit. Any help would
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2009 Apr 28
1
[macosx] improving quartz & Aqua Tk behaviour outside of RGui
Hello, On Mac OS X, certain Aqua/Quartz UI functionality requires an application to be launched from within an app bundle, or (alternatively) requires a Carbon application with a resource fork. Playing with the wxWidgets distribution, I discovered that it is quite easy and transparent to make such a Carbon app from (I guess) any command line application. When applied to the R executable called
2003 Aug 15
1
menubutton don´t work
Why the variable archOp does not take the value that be chosen in the menubutton?, therefore always remains as a white one, I intend to charge the direccion of open files in a vector and then to elect with the menubutton with which to work but not functions thanks.Ruben library(tcltk) arch<-tclVar(init=" ") archOp<-tclVar(init=" ") vectPath<-c()
2002 Feb 11
0
read.table in TCL/TK interface
hello, i would like program userfriendly tcl/tk widgets like the t-test example in a more complex way ! (1) Is it not possible to combine tk_getOpenFile with the R function read.table to select in userfriendly way data sets ? (I'm newbie and take code-parts from t-test example and scripting example.) (2) Is it possible to use a variableSelection widget to select a special variable which i
2007 Feb 16
0
R GUI programming
Hi, All: I am having a problem with handling global variable value in GUI programming, I hope R gurus can give me some advice on it. What I want to do is to read in a dataset, display some information based on the input and do some calculation on the dataset: However, I am having trouble organizing my code, as the following code goes, the comboBox section will have to be put in the
2011 Oct 24
1
strsplit convert data
I am using the following code but I do not know the debug and run for correct errors library (tcltk) file <-tclvalue (tkgetOpenFile ()) if (nchar (file)) { tkmessageBox ("Select the file") } else { tkmessageBox (message = paste ("Was select file", file)) Dataset <- read.table (file, header = FALSE, sep = "", na.strings =
2008 Oct 27
1
ttkcombobox
Hi, all, (sessionInfo at the end) I've been struggling with the tcltk package and can't seem to get the ttkcombobox to work. Here's an example: library(tcltk) p <- tktoplevel() l <- tclVar() ## I don't know if I'm even calling it correctly cb <- ttkcombobox(p, values = letters[1:4], textvariable = l) tkpack(cb) 1. How do I know when the value of the combobox has
2011 Nov 28
5
window manager interface commands for linux
How can i replicate this in Linux: source(file.choose()) I've tried source(tkgetOpenFile()) but with no luck