Displaying 1 result from an estimated 1 matches for "nmbr1".
Did you mean:
nmbr
2012 Sep 09
1
Error msg in rpanel
...))
rp.menu(panel = main.panel, var = menu,
labels = list(list("Addition", "Add")),
action = my.menu)
# function to do adddition
add <- function(){
my.draw <- function(panel) {
if(panel$vals=="numbers"){
val<-as.numeric(panel$nmbr1)+as.numeric(panel$nmbr2)
}
else if(panel$vals=="strings"){
val <- paste(as.character(panel$nmbr1), "and" ,as.character(panel$nmbr2))
}
plot(1:10, 1:10, type="n", xlab="", ylab="",
axes=FALSE, frame = TRUE)
text(5, 5,...