calc_scags | R Documentation |
Compute selected scagnostics on subsets
calc_scags( x, y, scags = c("outlying", "stringy", "striated", "striated2", "clumpy", "clumpy2", "sparse", "skewed", "convex", "skinny", "monotonic", "splines", "dcor"), out.rm = TRUE, euclid = FALSE )
x |
numeric vector |
y |
numeric vector |
scags |
collection of strings matching names of scagnostics to calculate: outlying, stringy, striated, striated2, striped, clumpy, clumpy2, sparse, skewed, convex, skinny, monotonic, splines, dcor |
out.rm |
logical indicator to indicate if outliers should be removed before calculating non outlying measures |
euclid |
logical indicator to use Euclidean distance |
A data frame that gives the single plot's scagnostic score.
calc_scags_wide
# Calculate selected scagnostics on a single pair calc_scags(anscombe$x1, anscombe$y1, scags=c("monotonic", "outlying")) # Compute on long form data, or subsets # defined by a categorical variable require(dplyr) datasaurus_dozen %>% group_by(dataset) %>% summarise(calc_scags(x,y, scags=c("monotonic", "outlying", "convex")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.