Hi all, I have created following codes :
mat = cbind(c(0.000059710430,0.000023057380), c(0.000023057380, 0.00005971089)) set.seed = 1000 vary = runif(dim(mat)[1], 2000, 3000) calc = function(mat, vary) { result = vector(length = (length(vary)+1)) result[1] = sqrt(t(vary) %*% vary) for (i in 1 : length(vary)) { result[(i+1)] = sum(vary)*sum(vary*mat[,i]) } barplot(result) return(result) } Now I want to present the plot in some interactive manner. I want to put a slider in the plot where user move the slider for the 1st element of the vector "vary" and automatically this result will be reflected at the plot window. I already gone through some examples of "tkrplot" library, however unfortunately could not figure out how i can apply them in my problem. If anyone here explain me how to do that I would be grateful. Regards, Send instant messages to your online friends http://uk.messenger.yahoo.com [[alternative HTML version deleted]] ______________________________________________ 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.