sdf: Calculates measures from package 'scagnostics'.

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/sdf.R

Description

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

Usage

1
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.

Note

Uses '1-Convex' instead of 'Convex'.

The nine measures are: "Outlying", "Skewed", "Clumpy", "Sparse", "Striated", "1-Convex", "Skinny", "Stringy", "Monotonic"

Author(s)

Katrin Grimm

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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))

## End(Not run)

Example output

                             Outlying    Skewed     Clumpy     Sparse
Gruene * B60mehr...         0.2617790 0.7084832 0.01476224 0.04496785
Gruene * CDUCSUzv           0.1834984 0.7019566 0.04642332 0.05098757
Gruene * CDUCSU             0.1267493 0.6851772 0.04134091 0.04543697
Gruene * SPD                0.1117108 0.7098013 0.01977751 0.04847178
Gruene * mitHoch...         0.3050867 0.7480335 0.08906358 0.04876835
Gruene * Fortzuege.je.1000. 0.3735139 0.7521254 0.02647691 0.03777131
                              Striated  1-Convex    Skinny   Stringy
Gruene * B60mehr...         0.04672897 0.3660870 0.5135205 0.3484733
Gruene * CDUCSUzv           0.08786611 0.4404122 0.5125701 0.4129624
Gruene * CDUCSU             0.05761317 0.4371934 0.4716386 0.3550575
Gruene * SPD                0.04347826 0.3602193 0.4337006 0.4030814
Gruene * mitHoch...         0.07657658 0.4329868 0.4486979 0.2855878
Gruene * Fortzuege.je.1000. 0.03174603 0.4006631 0.5291456 0.3574234
                               Monotonic x y status
Gruene * B60mehr...         0.0944995070 1 2    non
Gruene * CDUCSUzv           0.0016998857 1 3    non
Gruene * CDUCSU             0.0004652768 1 4    non
Gruene * SPD                0.0194428468 1 5    non
Gruene * mitHoch...         0.1624690906 1 6    non
Gruene * Fortzuege.je.1000. 0.3619909073 1 7    non

mbgraphic documentation built on May 2, 2019, 2:45 a.m.