Is it possible to write a for loop with discrete levels?
I have a vector like this:
a<-c(1,1,1,1,1,3,3,5,11,18 ....1350)
This is an increasing series, but does not match the logical order;
I would like to start the for loop using levels (a) as an argument:
for i in 1:levels(a)
I get the following error:
In 1:levels_id : numerical expression has 1350 elements: only the first used
user1723765
source share