getReplicates | R Documentation |
determine how often appears x in X
getReplicates(x, X)
x |
row vector |
X |
matrix |
can be used to determine the number of replicates/repeated evaluations of a solution x
k <- 2 n <- 4 A <- matrix(1:(k*n),n,k, byrow = TRUE) X <- rbind(A,A,A) x <- A[1,] ## should be 3: getReplicates(x,X) ## U has unique entries U <- X[!duplicated(X), ] ## should be 1: getReplicates(x,U)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.