  We apply localization techniques to compute the partition function of a
two-dimensional N=(2,2) R-symmetric theory of vector and chiral multiplets on
S^2. The path integral reduces to a sum over topological sectors of a matrix
integral over the Cartan subalgebra of the gauge group. For gauge theories
which would be completely Higgsed in the presence of a Fayet-Iliopoulos term in
flat space, the path integral alternatively reduces to the product of a vortex
times an antivortex partition functions, weighted by semiclassical factors and
summed over isolated points on the Higgs branch. As applications we evaluate
the partition function for some U(N) gauge theories, showing equality of the
path integrals for theories conjectured to be dual by Hori and Tong and
deriving new expressions for vortex partition functions.
