Description Usage Arguments Value Author(s) Examples
If the sequences are not aligned (paired.samples = FALSE
), the function executes these steps.
Computes the autosum of the sequences with autoSum
.
Computes the distance matrix with distanceMatrix
.
Uses the distance matrix to compute the least cost matrix with leastCostMatrix
.
Extracts the cost of the least cost path with leastCost
.
Computes the dissimilarity measure psi with the function psi
.
Delivers an output of type "list" (default), "data.frame" or "matrix", depending on the user input, through formatPsi
.
If the sequences are aligned (paired.samples = TRUE
), these steps are executed:
Computes the autosum of the sequences with autoSum
.
Sums the distances between paired samples with distancePairedSamples
.
Computes the dissimilarity measure psi with the function psi
.
Delivers an output of type "list" (default), "data.frame" or "matrix", depending on the user input, through formatPsi
.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
sequences |
dataframe with multiple sequences identified by a grouping column generated by |
grouping.column |
character string, name of the column in |
time.column |
character string, name of the column with time/depth/rank data. |
exclude.columns |
character string or character vector with column names in |
method |
character string naming a distance metric. Valid entries are: "manhattan", "euclidean", "chi", and "hellinger". Invalid entries will throw an error. |
diagonal |
boolean, if |
format |
string, type of output. One of: "data.frame", "matrix". If |
paired.samples |
boolean, if |
same.time |
boolean. If |
ignore.blocks |
boolean. If |
parallel.execution |
boolean, if |
A list, matrix, or dataframe, with sequence names and psi values.
Blas Benito <blasbenito@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | data("sequencesMIS")
#prepare sequences
MIS.sequences <- prepareSequences(
sequences = sequencesMIS,
grouping.column = "MIS",
if.empty.cases = "zero",
transformation = "hellinger"
)
#execute workflow to compute psi
MIS.psi <- workflowPsi(
sequences = MIS.sequences[MIS.sequences$MIS %in% c("MIS-1", "MIS-2"), ],
grouping.column = "MIS",
time.column = NULL,
exclude.columns = NULL,
method = "manhattan",
diagonal = FALSE,
parallel.execution = FALSE
)
MIS.psi
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.