Compute scagnostics on all possible scatter plots for the given data

sc_pairwise(
  all_data,
  scags = c("outlying", "stringy", "striated", "clumpy", "sparse", "skewed", "convex",
    "skinny", "monotonic", "splines", "dcor"),
  euclid = TRUE
)

See also

calc_scags

Examples

require(GGally)
#> Loading required package: GGally
#> Registered S3 method overwritten by 'GGally':
#>   method from   
#>   +.gg   ggplot2
require(dplyr)
# Calculate selected scagnostics
sc_pairwise(datasaurus_dozen_wide,
  scags=c("outlying","clumpy","monotonic"))
#> # A tibble: 325 × 5
#> # Groups:   Var1 [25]
#>    Var1       Var2       outlying clumpy monotonic
#>    <fct>      <fct>         <dbl>  <dbl>     <dbl>
#>  1 away_y     away_x      0.0535   0.950    0.0573
#>  2 bullseye_x away_x      0.102    0.936    0.331 
#>  3 bullseye_x away_y      0.0801   0.895    0.0122
#>  4 bullseye_y away_x      0.0503   0.986    0.0457
#>  5 bullseye_y away_y      0.00936  0.971    0.0796
#>  6 bullseye_y bullseye_x  0.113    0.939    0.0787
#>  7 circle_x   away_x      0.140    0.977    0.311 
#>  8 circle_x   away_y      0        0.928    0.0135
#>  9 circle_x   bullseye_x  0.0172   0.989    0.871 
#> 10 circle_x   bullseye_y  0.204    0.987    0.127 
#> # … with 315 more rows

# Calculate all scagnsotics for all variable pairs and plot it
p <- sc_pairwise(datasaurus_dozen_wide) %>%
  GGally::ggpairs(scagdata, columns = 3:ncol(scagdata))
#> Error in GGally::ggpairs(., scagdata, columns = 3:ncol(scagdata)) object 'scagdata' not found
p
#> Error in eval(expr, envir, enclos) object 'p' not found
# to make it interactive use
# plotly::ggplotly(p)