Dynamics of Linear Perturbations in f(R) Gravity