# NOT RUN {
local(envir=.PBSmodEnv,expr={
#user defined function which is called on new data
drawLiss <- function() {
oldpar = par(no.readonly=TRUE); on.exit(par(oldpar))
getWinVal(scope="L");
tt <- 2*pi*(0:k)/k; x <- sin(2*pi*m*tt); y <- sin(2*pi*(n*tt+phi));
plot(x,y,type="p"); invisible(NULL); };
#create the vector window
createVector(c(m=2, n=3, phi=0, k=1000), func="drawLiss",
vectorLabels=c("x cycles","y cycles", "y phase", "points"));
})
# }
Run the code above in your browser using DataLab