mbgraphic (version 1.0.1)

sdf: Calculates measures from package scagnostics.

Description

The function calculates the scagnostics from package scagnostics and converts them to a list of class "sdfdata".

Usage

sdf(data, selection = "All")

Arguments

data

A data frame. If it contains categorical variables, they got excluded.

selection

Numeric or character. Do you want to use all nine measures or only a selection? Give the numbers of the measures or their names. Default is "All".

Value

A list of class "sdfdata" including data frames sdf and data.

sdf

The (up to) 9 scagnostics from the package scagnostics and a variable status, which describes if a plot is classified as "Outlier", "Exemplar" or not.

data

The original data frame minus categorical variables.

References

L. Wilkinson, A. Anand and R. Grossman (2005) Graph-Theoretic Scagnostics Proceedings of the 2005 IEEE Symposium on Information Visualization 157--164.

L. Wilkinson and A. Anand (2012) scagnostics: Compute scagnostics - scatterplot diagnostics. https://cran.r-project.org/package=scagnostics.

See Also

scag2sdf,

scagnostics in package scagnostics

Examples

Run this code
# NOT RUN {
data(Election2005)
# }
# NOT RUN {
set.seed(345456)
election05_small <- Election2005[,sample(5:70,10)]

scagdf <- sdf(election05_small)
head(scagdf$sdf)

# Use only "Outlying", "Clumpy" and "1-Convex"
scagdf_sel <- sdf(election05_small,selection=c("Outlying", "Clumpy","1-Convex"))
# the same as 
scagdf_sel <- sdf(election05_small,selection=c(1,3,6))
# }

Run the code above in your browser using DataLab