Skip to contents

This function will generate summary statistics for nearest neighbor comparisons generated by phyloAMR::nearest_neighbor_analysis()

Usage

nearest_neighbor_summary_statistics(
  nearest_neighbor_differences,
  categorical_vars = NULL,
  binary_vars = NULL,
  continuous_vars = NULL,
  log_2 = FALSE
)

Arguments

nearest_neighbor_differences

Dataframe with isolates and their nearest neighbors, generated from nearest_neighbor_analysis.

categorical_vars

Categorical variables. Must be in the comparison_df

binary_vars

Binary variables. Must be in the comparison_df AND coded 0 and 1.

continuous_vars

Continuous variables. Must be in the comparison_df

log_2

Boolean (TRUE/FALSE) Whether to perform log-2 transformation on continuous variables

Value

Dataframe with differences in the categorical and continuous variables between an isolate and their nearest neighbor