  We study the $f(R)$ theory of gravity in an anisotropic metric and its effect
on the baryon number to entropy ratio. The mechanism of gravitational
baryogenesis based on the CPT-violating gravitational interaction between
derivative of the Ricci scalar curvature and the baryon-number current is
investigated in the context of the $f(R)$ gravity. The gravitational
baryogenesis in the Bianchi type I universe is examined. We survey the effect
of anisotropy of the universe on the baryon asymmetry from point of view the
$f(R)$-theories of gravity and its effect on $n_{b}/s$ for radiation dominant
regime.
