  We consider a class of metric f(R) modified gravity theories, analyze them in
the context of a Friedmann-Robertson-Walker cosmology and confront the results
with some of the known constraints imposed by observations. In particular, we
focus in correctly reproducing the matter and effective cosmological constant
eras, the age of the Universe, and supernovae data. Our analysis differs in
many respects from previous studies. First, we avoid any transformation to a
scalar-tensor theory in order to be exempted of any potential pathologies (e.g.
multivalued scalar potentials) and also to evade any unnecessary discussion
regarding frames (i.e. Einstein vs Jordan). Second, based on a robust approach,
we recast the cosmology equations as an initial value problem subject to a
modified Hamiltonian constraint. Third, we solve the equations numerically
where the Ricci scalar itself is one of the variables, and use the constraint
equation to monitor the accuracy of the solutions. We compute the "equation of
state" (EOS) associated with the modifications of gravity using several
inequivalent definitions that have been proposed in the past and analyze it in
detail. We argue that one of these definitions has the best features. In
particular, we present the EOS around the so called "phantom divide" boundary
and compare it with previous findings.
