Henrik's proposal works well, so far. Thanks very much. I could not have figured that out (without much more suffering).
Here's the working example in case future googlers find their way to this thread. ## Paul Johnson <paulj...@ku.edu> ## 2012-01-30 ## Special thanks to r-help email list contributors, ## especially Henrik Bengtsson BM <- matrix("0.1", 5, 5) BM[2,1] <- "a" BM[3,2] <- "b" BM parseAndEval <- function(x, ...) eval(parse(text=x)) a <- 0.5 b <- 0.4 realBM <- apply(BM, MARGIN=c(1,2), FUN=parseAndEval) BM[4,5] <- "rnorm(1, m=7, sd=1)" BM realBM <- apply(BM, MARGIN=c(1,2), FUN=parseAndEval) realBM ## Now, what about gui interaction with that table? ## The best "nice looking" options are not practical at the moment. ## Try this instead data.entry(BM) ## That will work on all platforms, so far as I know, without ## any special effort from us. Run that, make some changes, then ## make sure you insert new R variables to match in your environment. ## Suppose you inserted the letter z in there somewhere ## set z out here z <- rpois(1, lambda=10) realBM <- apply(BM, MARGIN=c(1,2), FUN=parseAndEval) -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.