Learn R Programming

ddc (version 1.0.1)

createDistMatrix: Create the dataframe of the Dissimilarity matrix

Description

Use the DTW to generate the matrix

Usage

createDistMatrix(standard_matrix, output_dir = NULL, mc.cores = 1, ...)

Value

the matrix, which describes pairwise distinction between M objects. It is a square symmetrical 'MxM' matrix with the (ij)th element equal to the value of a chosen measure of distinction between the (i)th and the (j)th object.

Arguments

standard_matrix

the matrix genereated by function 'createStandardMatrix'

output_dir

the file to save the dissimilarity matrix data

mc.cores

the number of cores would be used in parallel

...

the same parameters which would be used in 'dtw' for calculating the distances of events

Examples

Run this code
# \donttest{
original_data <- data.frame("1"=c(1, 2, 1), "2"=c(5,6,7), 
   "3"=c(4, 5, 8), "4"=c(3, 1, 9))
standard_matrix <- createStandardMatrix(data = original_data)
dist_matrix <- createDistMatrix(standard_matrix = standard_matrix)
# }

Run the code above in your browser using DataLab