  R-matrix is explicitly constructed for simplest representations of the
Ding-Iohara-Miki algebra. The calculation is straightforward and significantly
simpler than the one through the universal R-matrix used for a similar
calculation in the Yangian case by A.~Smirnov but less general. We investigate
the interplay between the R-matrix structure and the structure of DIM algebra
intertwiners, i.e.\ of refined topological vertices and show that the R-matrix
is diagonalized by the action of the spectral duality belonging to the SL(2,Z)
group of DIM algebra automorphisms. We also construct the T-operators
satisfying the RTT relations with the R-matrix from refined amplitudes on
resolved conifold. We thus show that topological string theories on the toric
Calabi-Yau threefolds can be naturally interpreted as lattice integrable
models. Integrals of motion for these systems are related to q-deformation of
the reflection matrices of the Liouville/Toda theories.
