I have an array
a<-c(6,77,98,88,3,10,7,5)
I want to initialize another array with the 1st, 6th, and 8th element i.e. b should look as follows:
b = (6,10,5)
Is there a straightforward way to do this in R?
(I am a beginner, as I am sure you understand, on stack overflow as much as on R. I couldn't find the exact thing I am looking for - maybe I am using the wrong terms to search.)