Interactions with R? ANCOVA in R? I want to see if certain variables affect a dependent variable in R using repeated-measures I have done an experiment in which the same people have been measured in two conditions, the same room with and without plants. I know they performed significantly better on a reverse digit span task in plant condition (it was relatively normally distributed data so I used a paired t-test), but want to see if the increase is related to mood (as measured by a likert-type scale) and their responses on a measure that assesses the "restorativeness" of the environment (another likert-type scale). Theoretically one should perform better on a digit span in a more "restorative" room.
I might want to test if assessment of environment affects mood, which therefore affects performance on task. I would want to somehow compare this interaction (if that's the right term) in the plant condition and the no-plant condition. If that's too complex maybe I'd just want to see if the assessment of environment is a strong factor in their performance on the digit span.
Is ANCOVA the right test for this? If so how should it be set up and if you'd like to be really generous how would I code this in R? 
Thanks for your help.
 A: I'm answering this without knowing what effects you're trying to find. I'm guessing you're looking for an effect of having plants in the room, and assuming that this will be mediated by restorativeness and moderated and/or mediated by mood. If this is not the case, I'm not 100% sure I'll be making the correct recommendations here.
Thinking about your data types here, you have a single binary and two rank order variables. The correct correlation coefficient to use for a rank order variable is Kendall's Tau or Spearman's Rho. Either can be applied to a multiple regression/ANCOVA in the same way as Pearson's R, as both can be used to derive a partial correlation - the building block for regression analysis.
I'm not certain how this is done in R, but I'd guess that in either the LM or MASS package you might find a linear model with either of those rank order correlations as an option.
You could still use a normal regression as you suggest, but technically, the Likert scale items aren't going to be normally distributed, which will violate one of the ANCOVA's assumptions. However, the level of deviation from normality will depend on how many points on the Likert scale. If it's a ten point scale, and comes out with low kurtosis and skewness figures, it might technically be safe to run a normal regression based on Pearsons's R. Personally, I'd do both and check your outcomes.
As far as the interactions go, I'm assuming you're familiar with the idea of using dummy variables? So you'll actually have your the original variables as well as the binary variable multiplied by each of the two rank order variables; so yes four in total if you're testing all interactions.  Those new variables will represent the effect of plants AND restorativeness on performance. Although, if you think that plants cause restorativness you need to consider whether those two are really a sensible interaction to be testing, rather than testing for it blindly - if plants cause restorativeness, then presumably they can't interact to cause an effect. And you should bear in mind the order of entry into the model, as with any regression interaction effects are generally entered last. There are lots of tutorials on dummy variables and interaction online.
Repeated measures regression is hard to find references on, and I'll admit to being rusty. But you should be able to use the original dependant variable as a predictor variable in the regression. So if you include that as the first variable, then this will take into account the subject's base level of performance and allow you to explain that variance. If you then want to test whether plants had an effect, include this as the second variable entered into the regression, and you'll essentially find the variance that plants contribute, controlling for the within subject effect (the subject's baseline performance).
For details on how to check for mediation or moderation effects (if that's what you're expecting) take a look at wikipedia. Because you expect that the scores for restorativeness and mood might be correlated between t1 and t2, you would probably want to include restorativeness1 and mood1 in as variables in the regression before the t2 scores on those measures.
http://en.wikipedia.org/wiki/Mediation_%28statistics%29
http://en.wikipedia.org/wiki/Moderation_%28statistics%29
