search for: eye_subsetted_data

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

2007 Nov 15
1
Writing a helper function that takes in the dataframe and variable names and then does a subset and plot
...nel = function(x,y, ...) { panel.xyplot(x,y, ...) panel.abline(lm(y~x),lwd=2, ...) panel.loess(x,y,lwd=2,col.line='red', ...) }, xlab = xylabels[1], ylab= xylabels[2]) } plotwithfits(Latency ~ Stimulus.number | Subject.ID,eye_subsetted_data) # Works However, I can't get it working if I try the same for a subset and plot: explorebysubject <- function(xvar,yvar,data,condition=TRUE,xlim=c(-Inf,Inf),ylim=c(-Inf,Inf)) { temp_subset <- subset(data, subset=condition&xvar>xlim[1]&x...