dist_file_parts_merge: Merge parts of distances stored in files.

View source: R/utils.R

dist_file_parts_mergeR Documentation

Merge parts of distances stored in files.

Description

The functions tsdist_dir_parallel and tsdist_parts_parallel calculate part of the distance matrix D. The results of the multiple calls of these functions are normally stored in RDS or csv files. This function merges these files and construct a distance matrix D.

Usage

dist_file_parts_merge(list_files, dir_path, num_elements, file_type = "RDS")

Arguments

list_files

A list of files with distances.

dir_path

If list_files was not passed, than this function uses this parameter to read the files in this directory.

num_elements

The number of time series in the data set. The number of elements defines the number of rows ans columns in the distance matrix D.

file_type

The extension of the files where the distances are stored. It can be "RDS" (default) or "csv". The RDS files should be data frames composed by three columns i,j, and dist. This format is preferred because it is a compact file. The other option is a "csv" also containing the i,j, and dist columns.

Value

Distance matrix D


ts2net documentation built on June 9, 2022, 9:06 a.m.