  We study an extension of the supersymmetric standard model with four families
and gauged horizontal symmetry $SU(4)_H$, in which R parity automatically
follows as a consequence of gauge invariance and of the field content of the
model. Beyond ensuring R parity conservation, the horizontal symmetry allows
for the dynamical generation of a hierarchical pattern of fermion masses,
without the need of any ad hoc choice of small Yukawa couplings. The structure
of the mass matrices implies that the fourth family does not mix with the other
three, and that the $b',t',\tau',\nu'$ masses are all naturally in the 100 GeV
range. The model has other interesting phenomenological implications. The scale
of the horizontal symmetry breaking is constrained by cosmological and
astrophysical arguments to be $\sim 10^{11}$ GeV. Then the late $b'$ decays
could explain a magnitude of the isotropic cosmic gamma flux. In addition, a
lower bound of a few eV is found for the mass of the $\tau$-neutrino, which can
thus provide a hot component for the cosmological dark matter. Due to R parity
conservation, the lightest supersymmetric particle is stable and can provide
the cold component. The $\nu_e$ and $\nu_\mu$ masses can naturally be in the
correct ranges for a solution of the solar or atmospheric neutrino problems via
neutrino oscillations.
