When basis==NULL this function search x, y, z or a, b, c columns in x.If x, y, z columns are found in x they are used to a set the first, second and third coordinates of the returned coords object.
In that case the basis set of x is set to "xyz".
If a, b, c columns are found in x they are used to a set the first, second and third coordinates of the returned coords object.
In that case the basis set of x is set to "abc".
If the function doesn't found neither the x, y, z nor the a, b, c columns an error is returned.
When basis!=NULL it has to be equal to "xyz" or "abc" and x must have exactly 3 columns.