Updated indexing for R