Looping over R Data Structures