MDSmap: Multidimensional scaling (MDS) in 2 dimensions

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

View source: R/MDSmap.R

Description

Multidimensional scaling (MDS) in 2 dimensions

Usage

1
MDSmap(data, std = TRUE)

Arguments

data

a numeric matrix, data frame or "dist" object (see dist).

std

logical; if TRUE, data columns are standardized (centered and scaled).

Details

If data is an object of class "dist", std is not active and data is directly inputted into MASS::isoMDS.

Value

An object of class MDSmap, i.e. a list with 4 objects:

Author(s)

Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)

References

P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.

See Also

isoMDS, plot.MDSmap.

Examples

1
2
3
4
5
6
data <- with(Pbox, data.frame(PTS, P3M, P2M, REB=OREB+DREB, AST, TOV, STL, BLK))
selp <- which(Pbox$MIN >= 1500)
data <- data[selp, ]
id <- Pbox$Player[selp]
mds <- MDSmap(data)
plot(mds, labels=id, z.var="P2M", level.plot=FALSE, palette=rainbow)

Example output

Loading required package: ggplot2
Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2

If you want to reproduce the figures contained in the book of
Zuccolotto and Manisera (2020) and
if the version of your R machine is >= 3.6.0, you need to type
RNGkind(sample.kind = "Rounding")
at the beginning of your working session
initial  value 15.910514 
iter   5 value 13.124944
final  value 12.967089 
converged

BasketballAnalyzeR documentation built on July 2, 2020, 2:14 a.m.