0

Possible Duplicate:
Access lapply index names inside FUN

I was wondering if it was possible to access the number of the object within a list when using lapply?

If I was using a for(i in 1:100){.....} function I could just use print(i) to get this, but is there any way of doing this using lapply. I know using the function substitute() I can return something list X[[6L]] if I was in the 6th object, but is there away of just returning 6?

Thanks

Community
  • 1
  • 1
user1165199
  • 5,775
  • 13
  • 42
  • 59

0 Answers0