similar | R Documentation |
Return TRUE only if all elements of x are present and only once in y.
similar(x, y, test.names = FALSE)
x |
A vector with numeric or character elements |
y |
A vector with numeric or character elements |
test.names |
Logical. If TRUE, the names of the vector elements must be also identical and unique |
A logical TRUE or FALSE
Marc Girondot marc.girondot@gmail.com
## Not run:
A <- c("A", "B", "C", "D")
B <- c("A", "B", "C", "D")
similar(A, B)
similar(B, A)
A <- c(x="A", y="B", z="C", k="D")
B <- c(x="A", y="B", z="C", l="D")
similar(B, A)
similar(A, B, test.names=TRUE)
A <- c(x="A", y="B", z="C", k="D")
B <- c(x="A", z="C", k="D", y="B")
similar(B, A)
similar(A, B, test.names=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.