nearest_neighbor_analysis: Generate nearest neighbor comparisons for isolate pairs
Source:R/nearest_neighbor_analysis.R
nearest_neighbor_analysis.Rd
This function will compare the isolate to their nearest neighbor generated from phyloAMR::nearest_neighbor_algorithm(). Has functionality for categorical and continuous variables.
Usage
nearest_neighbor_analysis(
nearest_neighbor_df,
categorical_vars = NULL,
binary_vars = NULL,
continuous_vars = NULL,
log_2 = FALSE
)
Arguments
- nearest_neighbor_df
Dataframe with isolates and their nearest neighbors. Can work on
- categorical_vars
Categorical variables. Must be in the nearest_neighbor_df
- binary_vars
Binary variables. Must be in the nearest_neighbor_df AND coded 0 and 1.
- continuous_vars
Continuous variables. Must be in the nearest_neighbor_df
- log_2
Boolean (TRUE/FALSE) Whether to perform log-2 transformation on continuous variables