  I propose an alternative $f(R)$ theory of gravity constructed by applying the
function $f$ directly to the Ricci tensor instead of the Ricci scalar. The main
goal of this study is to derive the resulting modified Einstein equations for
the metric case with Levi-Civita connection, as well as for the general
nonmetric connection with torsion. The modification is then applied to the
Robertson-Walker metric so that the cosmological evolution corresponding to the
standard model can be studied. An appealing feature is that even in the vacuum
case, scenarios without initial singularity and exponential expansion can be
recovered. Finally, formulae for possible observational tests are given.
