The MacMahon R-matrix