variable_correlation: Computes the correlation of numerical variables with taxa...

View source: R/variable_correlation.R

variable_correlationR Documentation

Computes the correlation of numerical variables with taxa Function from the phylosmith-package.

Description

Computes the correlation of numerical variables with taxa

Usage

variable_correlation(phyloseq_obj, variables, treatment = NULL,
 subset = NULL, classification = NULL, method = "spearman", cores = 1)

Arguments

phyloseq_obj

A phyloseq-class object.

variables

Numericla factors within the in the sample_data to correlate with the abundance data.

treatment

Column name as a string or numeric in the sample_data. This can be a vector of multiple columns and they will be combined into a new column.

subset

A factor within the treatment. This will remove any samples that to not contain this factor. This can be a vector of multiple factors to subset on.

classification

Column name as a string or numeric in the tax_table for the factor to conglomerate by.

method

Which correlation method to calculate, "pearson", "spearman".

cores

numeric Number of CPU cores to use for the pair-wise permutations. Default (0) uses max cores available. Parallelization not available for systems running MacOS without openMP configuration.

Value

data.table

See Also

permute_rho phylosmith

Examples

variable_correlation(soil_column, variables = "Day",
treatment = c("Matrix", "Treatment"), subset = "Amended",
classification = "Phylum", method = "spearman", cores = 1)

schuyler-smith/phyloschuyler documentation built on March 27, 2024, 4:29 p.m.