Description Usage Arguments Author(s) See Also Examples

Check that the intersection of dimnames of two arrays are identical.

1 | ```
dimnames_match(a1, a2)
``` |

`a1, a2` |
Arrays with named dimnames. |

S<c3><b8>ren H<c3><b8>jsgaard, [email protected]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
ar1 = ar_new(c("a", "b"), levels=c(2, 3))
ar2 = ar_new(c("c", "a"), levels=c(2, 2))
ar1
ar2
## dimension a has levels a1,a2 in both ar1 and ar2.
# Hence we have a match.
dimnames_match(ar1, ar2)
ar1 = ar_new(c("a", "b"), levels=c(2, 3))
ar2 = ar_new(c("c", "a"), levels=c(2, 3))
ar1
ar2
## dimension a has levels a1,a2 in ar1 and levels a1,a2,a3 in ar2.
# Hence we do not have a match.
dimnames_match(ar1, ar2)
ar2 = ar_new(c("c", "a"), levels=list(c=c("c1", "c2"), a=c("a2", "a1")))
ar2
## dimension a has levels a1,a2 in ar1 and levels a2,a1 in ar2.
# Hence we do not have a match.
dimnames_match(ar1, ar2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.