getReplicates: get number of replicates

View source: R/spotTools.R

getReplicatesR Documentation

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

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)


SPOT documentation built on June 26, 2022, 1:06 a.m.