  The direct observation of gravitational waves (GWs) in the near future, and
the corresponding determination of the number of independent polarizations, is
a powerful tool to test general relativity and alternative theories of gravity.
In the present work we use the Newman-Penrose formalism to characterize GWs in
quadratic gravity and in a particular class of f(R) Lagrangians. We find that
both quadratic gravity and the f(R) theory belong to the most general invariant
class of GWs, i.e., they can present up to six independent polarizations of
GWs. For a particular combination of the parameters, we find that quadratic
gravity can present up to five polarizations states. On the other hand, if we
use the Palatini approach for f(R) theories, GWs present only the usual two
transverse-traceless polarizations such as in general relativity. Thus, we
conclude that the observation of GWs can strongly constrain the suitable
formalism for these theories.
