Hi there,

I'm automatically generating buttons depending on the amount of rows  
my dataframe consists of. The buttons are supposed to call a barplot- 
function. Generating the buttons and displaying the barplot isn't a  
problem, but once I press one of the buttons, I'm getting an error- 
message.

My dataframe contains only integers. The number of rows usually  
doesn't exceed 6 rows.

So, if anyone knows, what I'm doing wrong, please let me know. I don't  
think, that I really have to generate each button seperately.


this is how I generate my buttons:

base <- tktoplevel()
for(i in 1:nrow(dataframe))
       tkgrid(but <- tkbutton(base, text = paste("Barplot:", i),  
command =  function() {barplot(height = data.matrix(dataframe[i,]),  
names.arg = names(dataframe))}))


this is the error-code I get:

*** caught segfault ***
address 0xc0000023, cause 'memory not mapped'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
error in background error handler:
out of stack space (infinite loop?)
     while executing
"::tcl::Bgerror {out of stack space (infinite loop?)} {-code 1 -level  
0 -errorcode NONE -errorinfo {out of stack space (infinite loop?)
     while execu..."

And here is my sessionInfo:
R version 2.9.1 (2009-06-26)
i386-apple-darwin8.11.1

locale:
de_DE.UTF-8/de_DE.UTF-8/C/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets   
methods   base

Thanks for the help,
--
Anne Skoeries




	[[alternative HTML version deleted]]


