The null is that the probabilities of being classified into cells [i,j] and [j,i] are the same.
If x is a matrix, it is taken as a two-dimensional contingency table, and hence its entries should be nonnegative integers. Otherwise, both x and y must be vectors or factors of the same length. Incomplete cases are removed, vectors are coerced into factors, and the contingency table is computed from these.
References
Lehmacher, W. (1980) Simultaneous sign tests for marginal homogeneity of square contingency tables
Biometrical Journal, Volume 22, Issue 8, pages 795-798
See Also
mcnemar.test (resp. BowkerTest for a CxC-matrix), StuartMaxwellTest, WoolfTest