Skip to contents

Lists the methods smart_cor() can compute for two variable types. Use it before forcing a method.

Usage

available_methods(type_x, type_y)

Arguments

type_x, type_y

Character strings: "continuous", "count", "binary", "ordinal", or "categorical".

Value

A tibble with columns method (code name) and label (human-readable description).

Examples

path = system.file("extdata", "gss_2024_casestudy.csv", package = "smartcor")
gss = read.csv(path)
available_methods(detect_type(gss$degree), detect_type(gss$happy))
#> # A tibble: 4 × 2
#>   method     label                    
#>   <chr>      <chr>                    
#> 1 polychoric Polychoric Correlation   
#> 2 kendall    Kendall's Tau-b          
#> 3 spearman   Spearman Rank Correlation
#> 4 gamma      Goodman-Kruskal's Gamma