Dear Rxperts!

I was wondering if 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 simulated data overlaid with observed data?

Have a good weekend!

Thanx,
Santosh

	[[alternative HTML version deleted]]


