We will give new applications of quantum groups to the study of spherical Whittaker functions on the metaplectic n-fold cover of GL(r, F ), where F is a nonarchimedean local field. Earlier Brubaker, Bump, Friedberg, Chinta and Gunnells had shown that these Whittaker functions can be identified with the partition functions of statistical mechanical systems. They postulated that a Yang-Baxter equation underlies the properties of these Whittaker functions. We confirm this, and identify the corresponding Yang-Baxter equation with that of the quantum affine Lie superalgebra U √ v ( gl(1|n)), modified by Drinfeld twisting to introduce Gauss sums. (The deformation parameter v is specialized to the inverse of the residue field cardinality.)For principal series representations of metaplectic groups, the Whittaker models are not unique. The scattering matrix for the standard intertwining operators is vector valued. For a simple reflection, it was computed by Kazhdan and Patterson, who applied it to generalized theta series. We will show that the scattering matrix on the space of Whittaker functions for a simple reflection coincides with the twisted R-matrix of the quantum group U √ v ( gl(n)). This is a piece of the twisted R-matrix for U √ v ( gl(1|n)), mentioned above.2010 Mathematics Subject Classification. Primary 16T25; Secondary 22E50.1 the representation theory of p-adic groups and quantum groups, which should allow one to use techniques from the theory of quantum groups to study metaplectic Whittaker functions. Although we can now prove this directly, we were led to this result by studying lattice models whose partition functions give values of Whittaker functions on a metaplectic cover of GL(r, F ). In [8], it was predicted that a solvable such model should exist; i.e., one for which a solution to the Yang-Baxter equation exists. Such a solvable model has important applications in number theory: it gives easy proofs (in the style of Kuperberg's proof of the alternating sign matrix conjecture) of several facts about Weyl group multiple Dirichlet series [11]. The other main result of this paper is the discovery of a solvable lattice model whose partition function is a metaplectic Whittaker function. Moreover, we relate this solution to an R-matrix for the quantum affine superalgebra gl(1|n). The relation between the two main results follows from the inclusion of (quantum affine) gl(n) into gl(1|n).We now explain these results in more detail. Let G denote an n-fold metaplectic cover of G := GL(r, F ) where the non-archimedean local field F contains the 2n-th roots of unity. Given a partition λ of length r, we will exhibit a system S λ whose partition function equals the value of one particular spherical Whittaker function at s diag(p λ 1 , . . . , p λr ) , where s : GL(r, F ) → G is a standard section.The systems proposed in [8] were generalizations of the six-vertex model. The six-vertex model with field-free boundary conditions was solved by Lieb [30], Sutherland [40] and Baxter [2] and were motivating examples th...