Compute adjusted clumpy measure using MST

sc_clumpy2(x, y)

# S3 method for default
sc_clumpy2(x, y)

# S3 method for scree
sc_clumpy2(x, y = NULL)

# S3 method for igraph
sc_clumpy2(x, y)

Arguments

x

numeric vector of x values

y

numeric vector of y values

Value

A "numeric" object that gives the plot's clumpy2 score.

Examples

  require(ggplot2)
  require(dplyr)
  ggplot(features, aes(x=x, y=y)) +
     geom_point() +
     facet_wrap(~feature, ncol = 5, scales = "free")

  features %>% group_by(feature) %>% summarise(clumpy = sc_clumpy2(x,y))
#> # A tibble: 15 × 2
#>    feature    clumpy
#>    <chr>       <dbl>
#>  1 barrier     0    
#>  2 clusters    0.839
#>  3 discrete    0.493
#>  4 disk        0    
#>  5 gaps        0.752
#>  6 l-shape     0    
#>  7 line        0.813
#>  8 nonlinear1  0    
#>  9 nonlinear2  0    
#> 10 outliers    0.525
#> 11 outliers2   0    
#> 12 positive    0    
#> 13 ring        0    
#> 14 vlines      0    
#> 15 weak        0    
  sc_clumpy2(datasaurus_dozen_wide$away_x, datasaurus_dozen_wide$away_y)
#> [1] 0