mp_extract_dist-methods: extract the dist object from MPSE or tbl_mpse object

mp_extract_distR Documentation

extract the dist object from MPSE or tbl_mpse object

Description

extract the dist object from MPSE or tbl_mpse object

Usage

mp_extract_dist(x, distmethod, type = "sample", .group = NULL, ...)

## S4 method for signature 'MPSE'
mp_extract_dist(x, distmethod, type = "sample", .group = NULL, ...)

## S4 method for signature 'tbl_mpse'
mp_extract_dist(x, distmethod, type = "sample", .group = NULL, ...)

## S4 method for signature 'grouped_df_mpse'
mp_extract_dist(x, distmethod, type = "sample", .group = NULL, ...)

Arguments

x

MPSE object or tbl_mpse object

distmethod

character the method of calculated distance.

type

character, which type distance to be extracted, 'sample' represents the distance between the samples based on feature abundance matrix, 'feature' represents the distance between the features based on feature abundance matrix, 'env' represents the the distance between the samples based on continuous environment factors, default is 'sample'.

.group

the column name of sample information, which only work with type='sample' or type='env', default is NULL, when it is provided, a tibble that can be visualized via ggplot2 will return.

...

additional parameters

Value

dist object or tbl_df object when .group is provided.


YuLab-SMU/MicrobiotaProcess documentation built on Nov. 8, 2024, 4:37 p.m.