NA's values are not allowed in any of the arguments.
The matrix or data.frame to convert into loca.p must have at least two columns.
The first column will be consider as the x coordinates, the second as the y coordinates, and the third (if given) as the values of weights w.