Anisotropy of particle fluxes in primary cosmic rays measured with the alpha magnetic spectrometer on the ISS