Test of lepton flavor universality in B
± → K
±μ+μ− and B
± → K
±e
+e
− decays in proton-proton collisions at
s = 13 TeV
A test of lepton flavor universality in $B^{\pm}\to K^{\pm}\mu^+\mu^-$ and $B^{\pm}\to K^{\pm}e^+e^-$ decays is performed using a dedicated high-rate data stream of proton-proton collisions at $\sqrt{s}=13$ TeV recorded by the CMS experiment. The double ratio $R(K)$ of these branching fractions to those of $B^{\pm}\to J/\psi K^{\pm}$ with $J/\psi\to\ell^+\ell^-$ is measured in $1.1<q^2<6.0$ GeV$^2$, yielding $R(K)=0.78^{+0.47}_{-0.23}$, consistent with the standard model expectation $R(K)\approx1$, but limited by the statistical precision of the electron channel.