Type: | Package |
Title: | Various Multivariate Graphics with Variable Choice in Shiny Apps |
Version: | 0.1.2 |
Date: | 2021-11-08 |
Description: | Mosaic diagram, scatterplot matrix, Andrews curves, parallel coordinate diagram, radar diagram, and Chernoff plots as a Shiny app, which allow the order of variables to be changed interactively. The apps are intended as teaching examples. |
License: | GPL-3 |
Encoding: | UTF-8 |
Imports: | MASS, fmsb, DescTools, shiny, shinydashboard, sortable |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2021-11-08 12:07:36 UTC; sk |
Author: | Sigbert Klinke [aut, cre] |
Maintainer: | Sigbert Klinke <sigbert@hu-berlin.de> |
Repository: | CRAN |
Date/Publication: | 2021-11-09 08:10:02 UTC |
andrews
Description
Andrews curves for visualization of multidimensional data.
step
determines the number of line segments for each curve.
If ymax==NA
then the maximum y coordinate will be determined from the curves.
Note that for type==3
the x range is [0, 4*pi]
otherwise [-pi, pi]
.
Usage
andrews(x, type = 1, step = 100, ..., normalize = 1, ymax = NA)
Arguments
x |
data frame or matrix |
type |
type of curve (default:
|
step |
smoothness of curves |
... |
further parameters given to graphics::plot and |
normalize |
integer: normalization method (default:
|
ymax |
numeric: maximum of y coordinate (default: |
Value
nothing
References
Andrews, D. F. (1972) Plots of High-Dimensional Data. Biometrics, vol. 28, no. 1, pp. 125-136.
Khattree, R., Naik, D. N. (2002) Andrews Plots for Multivariate Data: Some New Suggestions and Applications. Journal of Statistical Planning and Inference, vol. 100, no. 2, pp. 411-425.
See Also
Examples
andrews(iris[,-5], col=as.factor(iris[,5]))
andrews(iris[,-5], type=4, col=as.factor(iris[,5]), ymax=2)
normalize
Description
Extracts the numeric vectors from a data frame and normalizes each vector.
Usage
normalize(x, method = 1)
Arguments
x |
data.frame or matrix |
method |
integer: normalization method (default:
|
Value
numeric matrix
See Also
In package normalize
or at CRAN
Examples
normalize(iris, 2)
order_andrews
Description
Returns a reording of the columns of x
to visualize outliers or clusters better.
If no colum names are given then V1
, V2
, ... will be used.
Usage
order_andrews(x, method = 1)
Arguments
x |
data matrix |
method |
numeric: order method (default:
|
Value
order of column vectors
Examples
order_andrews(iris)
order_parcoord
Description
Returns a reordering of the columns of x
to visualize highly correlated variable pairs
based on a cluster analysis of the correlation matrix.
If no colum names are given then V1
, V2
, ... will be used.
Usage
order_parcoord(x, method = "spearman", ...)
Arguments
x |
data matrix |
method |
numeric: order method (default: |
... |
further parameters given to |
Value
order of column vectors
Examples
order_parcoord(iris)
sandrews
Description
Shiny app for creating an Andrews curve diagram with interactive variable selection.
Usage
sandrews(data, xvar = character(0), ...)
Arguments
data |
matrix or data.frame |
xvar |
character: names of selected variables for the plot |
... |
further parameters given to |
Value
nothing
Examples
if (interactive()) sandrews(iris)
schernoff
Description
Shiny app for creating a Chernoff faces plot with interactive variable selection.
Usage
schernoff(data, xvar = character(0), ...)
Arguments
data |
matrix or data.frame |
xvar |
character: names of selected variables for the plot |
... |
further parameters given to |
Value
nothing
Examples
if (interactive()) schernoff(normalize(iris))
smosaic
Description
Shiny app for creating a Mosaic plot with interactive variable selection.
Usage
smosaic(data, xvar = character(0), yvar = character(0), ...)
Arguments
data |
table or data.frame |
xvar |
character: names of selected variables for x-axis |
yvar |
character: names of selected variables for y-axis |
... |
further parameters given to |
Value
nothing
Examples
if (interactive()) smosaic(Titanic)
dfTitanic <- table2dataframe(Titanic)
if (interactive()) smosaic(dfTitanic)
spairs
Description
Shiny app for creating a scatterplot matrix with interactive variable selection.
Usage
spairs(data, xvar = character(0), ...)
Arguments
data |
matrix or data.frame |
xvar |
character: names of selected variables for the plot |
... |
further parameters given to |
Value
nothing
Examples
if (interactive()) spairs(iris, col=as.factor(iris$Species))
sandrews
Description
Shiny app for creating a Parallel Coordinate plot with interactive variable selection.
Usage
sparcoord(data, xvar = character(0), ...)
Arguments
data |
matrix or data.frame |
xvar |
character: names of selected variables for the plot |
... |
further parameters given to |
Value
nothing
Examples
if (interactive()) sparcoord(iris, col=as.factor(iris$Species))
sradar
Description
Shiny app for creating radar charts with interactive variable selection.
Usage
sradar(data, xvar = character(0), ...)
Arguments
data |
matrix or data.frame |
xvar |
character: names of selected variables for the plot |
... |
further parameters given to |
Value
nothing
Examples
if (interactive()) sradar(normalize(iris))
table2dataframe
Description
Converts a table to a full data frame.
Usage
table2dataframe(tab, ...)
Arguments
tab |
table: contingency table |
... |
further parameters given to |
Value
a data frame with sum(tab)
rows and length(dim(tab))
cols
Examples
table2dataframe(Titanic)