Kazhdan-Lusztig and R-polynomials, Young's lattice, and Dyck partitions