Learn R Programming

BasketballAnalyzeR (version 0.5.0)

plot.corranalysis: Plots the correlation matrix and the correlation network from a 'corranalysis' object

Description

Plots the correlation matrix and the correlation network from a 'corranalysis' object

Usage

# S3 method for corranalysis
plot(x, horizontal = TRUE, title = NULL, ...)

Arguments

x

an object of class corranalysis.

horizontal

logical; if TRUE, the two plots are arranged horizontally.

title

character, plot title.

...

other graphical parameters

Value

A ggplot2 object

References

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

See Also

corranalysis

Examples

Run this code
# NOT RUN {
data <- data.frame(Pbox$PTS,Pbox$P3M,Pbox$P2M,
                   Pbox$OREB + Pbox$DREB,Pbox$AST,
                   Pbox$TOV,Pbox$STL,Pbox$BLK)/Pbox$MIN
names(data) <- c("PTS","P3M","P2M","REB","AST","TOV","STL","BLK")
data <- subset(data, Pbox$MIN >= 500)
out <- corranalysis(data, threshold=0.5)
plot(out)
# }

Run the code above in your browser using DataLab