Anisotropy of cosmic ray fluxes measured with the alpha magnetic spectrometer on the ISS