generate_report_cminkowski: Generate a Microsoft Word document about the Minkowski...

View source: R/cmahalanobis.R

generate_report_cminkowskiR Documentation

Generate a Microsoft Word document about the Minkowski distance matrix and the p-values matrix with corresponding plots.

Description

This function takes a dataframe, a factor and returns a Microsoft Word document about the Minkowski distance matrix and the p-values matrix with corresponding plots.

Usage

generate_report_cminkowski(
  dataset,
  formula,
  p = 3,
  pvalue.method = "chisq",
  num.permutations = 10,
  num.bootstraps = 10
)

Arguments

dataset

A dataframe.

formula

A factor which you want to calculate the Minkowski distance matrix and the p_values matrix.

p

Order of the Minkowski distance

pvalue.method

A p_value method used to calculate the matrix, the default value is "chisq". Other methods are "permutation" and "bootstrap".

num.permutations

Number of permutation to specify if you select "permutation" in "pvalue.method". The default value is 100.

num.bootstraps

Number of bootstrap to specify if you select "bootstrap" in "p_value method". The default value is 10.

Value

A Microsoft Word document about the Minkowski distance matrix and the p_values matrix.

Examples

# Generate a report about "Species" factor in iris dataset
generate_report_cminkowski(iris, ~Species, p = 3)

# Generate a report about "am" factor in mtcars dataset
generate_report_cminkowski(mtcars, ~am, p = 3)


cmahalanobis documentation built on April 3, 2025, 8:51 p.m.