  Nonsingular cosmologies are investigated in the framework of f(R) gravity
within the first order formalism. General conditions for bounces in isotropic
and homogeneous cosmology are presented. It is shown that only a quadratic
curvature correction is needed to predict a bounce in a flat or to describe
cyclic evolution in a curved dust-filled universe. Formalism for perturbations
in these models is set up. In the simplest cases, the perturbations diverge at
the turnover. Conditions to obtain smooth evolution are derived.
