read_dist_matrix: Read a distance matrix

View source: R/read_dist_matrix.R

read_dist_matrixR Documentation

Read a distance matrix

Description

Read a distance matrix from a comma-separated vector (CSV) file. The file is assumed to be a square table with rows and columns for the same set of witnesses in the same order. The first column and row is taken to be witness names. Table elements are treated as numeric. (Each element of the diagonal should be zero.)

Usage

read_dist_matrix(fn)

Arguments

fn

A file name, which can be a URL.

Details

This is a wrapper for utils::read.csv.

Value

A square matrix.

Examples

x <- read_dist_matrix("https://zenodo.org/record/6505843/files/Acts.UBS2.dist.csv")


tjfinney/ANTTV documentation built on July 1, 2024, 11 p.m.