I want to correlate one variable (a) with about 20 others, controlling for one other variable (age) using partial correlation. I have been using p.cor from the ppcor package one pair at a time:
p.cor(a, b, age)
This is very tedious and doesn't account for multiple comparisons. I have found partial.cor from RcmdrMisc, which corrects for multiple comparison but controls for all other variables in the matrix, when I only want to control for age. This question answers how to control for only one variable, but doesn't correct for multiple comparisons.
I'm only a beginner to R but have some basic scripting experience. Any help would be greatly appreciated.