Displaying 2 results from an estimated 2 matches for "myplotfn".
2010 Jun 11
1
Windows, OSX and Linux: updating a graphic device and double buffering
...igure(SliderValueLabel,textvariable=SliderValue)
slider <- tkscale(tt, from=0, to=100,
showvalue=F, variable=SliderValue,
resolution=1, orient="horizontal", length = 200)
tkpack(slider, side = "top")
tkconfigure(slider, command=function(...){
state <- unlist(...)
myPlotFn(state)
})
myPlotFn <- function(state) {
plot(1,1, type = 'n', xlim = c(-10,110), ylim = c(-2,2))
lines(c(0,100), c(0,0), lwd=4)
points(as.numeric(tclvalue(SliderValue)),0, cex = 10, pch = 19, col =
"orange")
}
2005 Aug 15
3
How to repeat code snippet for several variables in a data frame?
Dear all,
I have a data frame containing the results of an experiment. Like this:
a<-seq(1,4,by=1)
b<-seq(1,2,by=1)
test<-expand.grid(b,a,a)
colnames(test)<-c("replicates","bins", "groups")
test$abc <- rnorm(32)
test$def <- rnorm(32)
test$ghi <- rnorm(32)
test
The following code snippet aggregates the data for one variable and then
draws a