Displaying 1 result from an estimated 1 matches for "explorebysubject".
2007 Nov 15
1
Writing a helper function that takes in the dataframe and variable names and then does a subset and plot
...=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]&xvar<xlim[2]&yvar>ylim[1]&yvar<ylim[2],
select=c(Group,Subject.ID,...