Learn R Programming

cba (version 0.2-25)

sdists.center: Centroid Sequences

Description

Find centroid sequences among a collection of sequences.

Usage

sdists.center(x, d = NULL, method = "ow", weight = c(1, 1, 0, 2),
              exclude = c(NA, NaN, Inf, -Inf), FUN = NULL, ...,
              unique = FALSE)

Value

A subset of x.

Arguments

x

a list (of vectors) of a vector of character.

d

a matrix or an object of class dist.

method

argument to sdists.

weight

argument to sdists.

exclude

argument to sdists.

FUN

a function to rank distances.

...

additional arguments to FUN.

unique

a logical specifying whether to return a unique set of sequences.

Author

Christian Buchta

Details

This function provides a wrapper to computing the distances among the sequences in x, unless d is supplied, and the subsequent selection of a set of centroid sequences with minimum sum of distances to any other sequence.

See Also

sdists for distance computation.

Examples

Run this code
x <- c("ABCD", "AD", "BCD", "ACF", "CDF", "BC")
sdists.center(x)

Run the code above in your browser using DataLab