load_2_dms: Load two dissimilarity matrices for use with mctoolsr

View source: R/input_output_filter.R

load_2_dmsR Documentation

Load two dissimilarity matrices for use with mctoolsr

Description

Load in two dissimilarity matrices and a corresponding metadata mapping file. Useful for Mantel tests when dms are already generated.

Usage

load_2_dms(dm1_fp, dm2_fp, map_fp, filter_cat, filter_vals, keep_vals)

Arguments

dm1_fp

Dissimilarity matrix filepath (tab-delimited text).

dm2_fp

Dissimilarity matrix filepath (tab-delimited text).

map_fp

Metadata mapping filepath.

filter_cat

[OPTIONAL] The map_fp header string for the factor you would like to use to filter samples.

filter_vals

[OPTIONAL] The values within the filter category (vector or single value) you would like to use to remove samples from the imported data.

keep_vals

[OPTIONAL] Alternatively, keep only samples represented by these values.

Value

A list variable with (1) the loaded dissimilarity matrix 1, (2) the loaded dissimilarity matrix 2, and (3) the loaded mapping file.

Examples

## Not run: 
load_dm("filepath_to_dissim_matrix1.txt", "filepath_to_dissim_matrix1.txt",
  "filepath_to_mapping_file.txt", "sample_type", filter_vals = "blank")

## End(Not run)

leffj/mctoolsr documentation built on Aug. 5, 2022, 1:27 a.m.