Learn R Programming

SPOT (version 2.11.10)

getReplicates: get number of replicates

Description

determine how often appears x in X

Usage

getReplicates(x, X)

Arguments

x

row vector

X

matrix

Details

can be used to determine the number of replicates/repeated evaluations of a solution x

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab