R markdown with lattice graphs implemented