Re: [R] unable to carry through object in a nested function

2014-01-22 Thread Chen, George
Hi, This is a resend of a previous message reproduced below but with sample data to run. Thanks. George Chen Hi There, I am having trouble carrying through an object listed in the outer function into the inner function of a nested pair. sample data below - library(plyr) SUBJE

[R] unable to carry through object in a nested function

2014-01-22 Thread Chen, George
Hi There, I am having trouble carrying through an object listed in the outer function into the inner function of a nested pair. This is my code: FindGreaterThanProportion<- function (y, SSThreshold) { DenomCells<-length(y) NumerCells<-subset(y,y>SSThreshold) PropCells<-length(NumerCel

[R] How do I perform conditional annotation of lattice panel plots?

2014-01-07 Thread Chen, George
My apologies for asking this question that may have been asked before. I am trying to plot activity dependent on time conditioned by the subject. Code for sample data below. So I have something like this xyplot(Activity~Time|Subject). This works fine, but now I want to show where on these activ