I want to get the every last element in a list. I have found that by using sapply function, the first element can be obtained.
sapply(a,`[`,1)
However, I don't actually understantd what is the meaning of [
, and how to get the last element in a similar way. This code doesn't work.
sapply(a,`]`,1)