The first call of VD.A yields 0 and the second yields 1 by just inverting the labels (wrong answers by the way). Notice that the vectors are not inverted when calling VD.A, only the labels. If one runs VD.A(c(nsga2,moead)) the correct answer 1 is given.
I am not entirely sure, but this does not look like the intended behaviour. I have tested it on Linux and Windows. My version of R is 4.0.1.
I ran into this issue the other day. Try to run the following code:
The first call of VD.A yields 0 and the second yields 1 by just inverting the labels (wrong answers by the way). Notice that the vectors are not inverted when calling VD.A, only the labels. If one runs
VD.A(c(nsga2,moead))
the correct answer 1 is given.I am not entirely sure, but this does not look like the intended behaviour. I have tested it on Linux and Windows. My version of R is 4.0.1.
Thanks.