Say I want to subset a vector a
, I can pass the value of the indices to subset in a variable e.g. a[idx]
.
What value should I set idx
to get the equivalent of getting the whole a
( i.e. a[]
) ?
Basically I have a function with idx
as the argument, and would like to pass a value to process the whole dataset. I'm assuming there should be something better than 1:length(a)
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…