[R] Interactive plot

From: Ron Michael <ron_michael70_at_yahoo.com>
Date: Sat, 28 Jun 2008 21:59:41 -0700 (PDT)

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])


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.


Send instant messages to your online friends http://uk.messenger.yahoo.com

        [[alternative HTML version deleted]]

R-help_at_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. Received on Sun 29 Jun 2008 - 05:06:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 30 Jun 2008 - 17:31:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive