R: Centroid Sequences

sdists.center {cba} | R Documentation

## 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)

### 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.

### 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.

### Value

A subset of `x`.

### Author(s)

Christian Buchta

### See Also

`sdists` for distance computation.

### Examples

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

[Package cba version 0.2-21 Index]