1 Introduction

2 Viable cosmologies in $f(R)$ theories

3 A generic equation of state for modified gravity

4 Perturbations with the generic $w_{f(R)}$

5 Observational samples

6 Methodology using late-time samples

7 Methodology using early-time samples

8 Results and Conclusions