corr.plot | R Documentation |
Correlation Coefficients and Scatter Plots of Discrete Random variables
corr.plot(X, Mt, item, dig = 4, prt = TRUE, pprt = FALSE, plot = FALSE)
X |
Sample space vector of X |
Mt |
Plot title |
item |
Names of random variables |
dig |
Number of effective digits, Default: 5 |
prt |
Print the result? Default: TRUE |
pprt |
Print frequency tables? Default: FALSE |
plot |
Plot the PDF and scatter plots? Default: FALSE |
None.
S = rolldie2(4) item = c("Sum", "Max", "Min", "Range") X = list() X[[1]] = apply(S, 1, sum) X[[2]] = apply(S, 1, max) X[[3]] = apply(S, 1, min) X[[4]] = X[[2]]-X[[3]] Mt = paste("PDF of", item, "in 4 Dice") corr.plot(X, Mt, item, pprt=T, plot=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.