How did you read your data into dartR?
It might be that you don’t have information in the slot “loc.all".
What is printed when you type:
If you don’t have information in this slot, you can create a dummy variable, as below:
> gl$loc.all <- rep("G/C",nLoc(gl))
Then try again running the function.