Comparing means from two dependent (or semi-dependent) populations


I'm after a little bit of advice about testing means for statistical significance.

I have some survey data from two different periods that went to roughly the same population (this survey went to teachers at a range of schools) and I would like to compare the means for each school to see if changes in the means are statistically significant. I'm pretty sure that I need to do a t-test and that I can consider the samples dependent (even though I can't be sure that the same teachers responded to the survey each time). One small complication is that there were different numbers of responses from each school.

I'm a moderately competent R user and have found the t.test function. Is that the best one to use?

Thanks in advance!