search for: pltit

Displaying 1 result from an estimated 1 matches for "pltit".

Did you mean: plotit
2009 Nov 21
3
"subset" or "condition" as argument to a function
...it is possible to write a function which can take in argument of a subset or condition.. Of course, I am aware of the alternate methods like coplot, par.plot, xyplot etc... I am specifically interested in using conditions/subsets with "plot".. A simple fragmented example is shown here.. pltit <- function(y,x,dat,dat1,dat2,sbst) { plot(y~x, data=dat, subset=sbst) lines(y~x,data=dat1, subset=subst) points(y~x,data=dat2,subset=subst) } pltit(profit,weeks,dat=zone1, sbst='group==1&sales>200') Could you also suggest pointers/references/examples on efficient ways to plot s...