Displaying 20 results from an estimated 800 matches similar to: "Tcl error - brace in argument?"
2006 Mar 02
5
Deparsing '...'
Hi,
The following function works, but is there a neater way to write it?
f = function(x,...)
{
# return a character vector of the arguments passed in after 'x'
gsub("
","",unlist(strsplit(deparse(substitute(list(...))),"[(,)]")))[-1]
}
> f(x,a,b,c*d)
[1] "a" "b" "c*d"
>
Thanks.
[[alternative HTML
2005 Dec 09
3
[R] data.frame() size
Hi,
Please see below for post on r-help regarding data.frame() and the
possibility of dropping rownames, for space and time reasons.
I've made some changes, attached, and it seems to be working well. I see the
expected space (90% saved) and time (10 times faster) savings. There are no
doubt some bugs, and needs more work and testing, but I thought I would post
first at this stage.
Could some
2005 Dec 08
2
data.frame() size
Hi,
In the example below why is d 10 times bigger than m, according to
object.size ? It also takes around 10 times as long to create, which fits
with object.size() being truthful. gcinfo(TRUE) also indicates a great deal
more garbage collector activity caused by data.frame() than matrix().
$ R --vanilla
....
> nr = 1000000
> system.time(m<<-matrix(integer(1), nrow=nr, ncol=2))
[1]
2006 May 23
4
Avoiding a memory copy by [[
Hi,
n = 10000000
L = list(a=integer(n), b=integer(n))
L[[2]][1:10] gives me the first 10 items of the 2nd vector in the list L.
It works fine. However it appears to copy the entire L[[2]] vector in
memory first, before subsetting it. It seems reasonable that "[[" can't
know that all that is to be done is to do [1:10] on the result and therefore
a copy in memory of the entire
2006 Aug 09
1
tk combobox question
Hello!
The IWigdets::combobox has an option "selectioncommand" to specify a procedure
which is called when an item in the combobox is selected.
Does ComboBox from Bwidgets have an equal option or is there a simple method to
do thi? I haven't found one but i would like to use Bwidgets instead of Iwidgets.
Another question which should not be a problem, but at the moment I just
2009 Jun 11
0
Problem with tabbed notebook (tcltk, Iwidgets)
Hi,
I'm using R version 2.9.0 and I'm trying to execute an example using
tabnotebook from iwidgets. Unfortunately I get a problem as you can see
bellow:
> library(tcltk)
Loading Tcl/Tk interface ... done
> library(tkrplot)
> tclRequire("Iwidgets")
<Tcl> 4.0.1
>
> tt <- tktoplevel()
> tkpack(tn <- tkwidget(tt, "iwidgets::tabnotebook"))
2009 Jun 12
0
Problem with tabbed notebook (tcltk, Iwidgets)
Hi,
I'm using R version 2.9.0 and I'm trying to execute an example using
tabnotebook from iwidgets. Unfortunately I get a problem as you can see
bellow:
> library(tcltk)
Loading Tcl/Tk interface ... done
> library(tkrplot)
> tclRequire("Iwidgets")
<Tcl> 4.0.1
>
> tt <- tktoplevel()
> tkpack(tn <- tkwidget(tt, "iwidgets::tabnotebook"))
2003 Apr 23
1
iwidgets in tcltk in R 1.7.0
Hi,
I have successfully installed R 1.7.0 and ActiveTcl 8.4.2.0 in
Windows 2000. Yes, I know that Tcl is already bundled with
R 1.7.0, but I want to use the iwidgets package to create a
drop-down listbox, and I don't think iwidgets is included in the
bundled R 1.7.0/TclTk installation package. I have set the
environment variables TCL_LIBRARY and MY_TCLTK to the directory
where I
2004 May 26
1
FW: is.weekend() odd behaviour
Kurt,
Uwe suggested I write to you as maintainer of chron ... at the start of
is.weekend, in the check on the argument type, maybe just change chron() to
as.chron()? This would ensure as.chron.POSIXt gets called on POSIXt
arguments, and (I think) fixes the problem. I tested and it seems ok. No
warning/error required.
> is.weekend
function(x)
{
if(!inherits(x, "dates"))
2006 Mar 31
3
Function dependency function
Hi,
Is there a function taking a function as an argument, which returns all the
functions it calls, and all the the functions those functions call, and so
on? I could use Rprof, but that would involve executing the function,
which may miss some branches of code. I'd really like a function which
looks at the source code to work out all the functions that could possibly
be called. When I
2006 May 02
4
"a"+"b"
Hi,
Is there a way to define "+" so that "a"+"b" returns "ab" ?
> setMethod("+",c("character","character"),paste)
Error in setMethod("+", c("character", "character"), paste) :
the method for function '+' and signature e1="character",
e2="character" is sealed
2004 Apr 23
4
Tcl Tk table
Hi
I've a problem with the following example:
library(tcltk)
.Tcl("array unset tclArray")
myRarray <- matrix(1:1000, ncol=20)
for (i in (0:49))
for (j in (0:19))
.Tcl(paste("set tclArray(",i,",",j,") ",myRarray[i+1,j+1],sep=""))
tt<-tktoplevel()
table1 <- tkwidget(tt,"table",variable="tclArray",
2012 Mar 25
1
How to install tclRequire(Iwidgets)
hi, i'm trying to make "Tabbed Notebook Widget",but cannot install
"tclRequire(Iwidgets)".
I installed Activetcl but I don't know what can be the next step to execute
"tclRequire(Iwidgets)".
how can i do that?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/How-to-install-tclRequire-Iwidgets-tp4502775p4502775.html
Sent from the R help
2007 May 13
1
Dropdown boxes in tcltk and R
Hello,
I'm very much a newbie in R and more so in tcltk so apologies if this
question is stupid. Basically I am trying to use the combobox example
found here:
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/DropDown.html .
What I want to do is in that example get fruitChoice as a variable in R
in general. When I run that code, however, and the ask for fruitChoice
it says
2003 Apr 17
1
Help with TCL packages
Hello,
I am exploring the TCLTK package under R and try to load and use additional TCL libraries (under Windows, with TCL8.3). For example :
> addTclPath("C:/TCL/lib/bwidget1.5")
> tclRequire("BWidget")
<Tcl> 1.5
Loading seems to work, but when I try to create a specific widget :
# The main window appears correctly
> top=tktoplevel()
# Trying to insert a
2010 May 26
2
extracat , JGR, iWidgets install problems
[Environment: Win XP, R 2.10.1]
I'm trying to install the packages JGR and iWidgets required by the
extracat package to make the interactive plots
in the package work. I've tried various things, but nothing seems to
work. Here is my most recent attempt,
followed by my sessionInfo().
Does anyone have any suggestions how to make this work?
>
> library(extracat)
Loading
2009 Jan 20
1
tclarray with embedded spaces in data
I would like to use a tclArray:
mytkarray <- tclArray()
as the variable for a table:
table1 <- tkwidget(f1, 'table', variable= mytkarray)
but if I include character strings with embedded spaces, I get braces
appearing in the table.
I can remove them using a non-R tclarray, (the difference between the
first example of
http://www.sciviews.org/_rgui/tcltk/Tktable.html
and
2003 Apr 25
1
tcltk tkfilefind demo problem
Hi everyone,
I wonder if anybody observed the crash of the tkfilefind demo. I looked
into the code and it seems to crash executing
dirtree<-tkwidget(base, "hierarchy_dir",
root=path,
showparent="Parent",
showfiles=1,
showall=all.names,
2005 Aug 15
16
swig_up
Tracing down some things to add in validators and I''ve run across
something that kinda bothers me...
In order to implement validators you have to override the clone method.
The directors seems to be set up to specifically handle this situation.
However, whenever C++ calls back to the object''s methods the swig_get_up
function is returning false. It seems like swig_up
2003 Mar 27
0
R TclTk iwidgets::combobox
Thanks Peter,
I've started a new R session (in Windows) and managed to get
both ways working now :
### THIS WORKS !!! ###
library(tcltk)
tclRequire("IWidgets")
tt<-tktoplevel()
combo <- tkwidget(tt,"iwidgets::combobox")
tkpack(combo)
### AND THIS WORKS TOO !!! ###
tt<-tktoplevel()
win <- .Tk.subwin(tt)