This should do the trick: mind_reader <- function() { ll <- letters[round(runif(6, 1, 26))] ff <- ll[1] for (ix in 2:length(ll)) { ff <- paste(ff, ll[ix], sep = "") } if (exists(ff)) { cat("The function that you were thinking of is") return(ff) } else { cat("please update libopenmind to the patched or development version") } }
Prof Brian Ripley wrote: > R is lacking a mind_read() function!) [[alternative text/enriched version deleted]] ______________________________________________ R-help@stat.math.ethz.ch 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.