powered by
Add correlation text to scatterplot.
addText( x, y, xcoord = NULL, ycoord = NULL, size = 1, col = NULL, method = "pearson" )
Correlation coefficient, degrees of freedom, and p-value printed on scatterplot.
vector of the variable for the x-axis.
vector of the variable for the y-axis.
x-coordinate for the location of the text.
y-coordinate for the location of the text.
size of the text font.
color of the text font.
method for calculating the association. One of:
"pearson" = Pearson product moment correlation coefficient
"pearson"
"spearman" = Spearman's rho
"spearman"
"kendall" = Kendall's tau
"kendall"
Adds a correlation coefficient and associated p-value to a scatterplot.
Other plot: plot2WayInteraction(), ppPlot(), semPlotInteraction(), vwReg()
plot2WayInteraction()
ppPlot()
semPlotInteraction()
vwReg()
Other correlations: cor.table(), crossTimeCorrelation(), crossTimeCorrelationDF(), partialcor.table(), vwReg()
cor.table()
crossTimeCorrelation()
crossTimeCorrelationDF()
partialcor.table()
# Prepare Data data("USArrests") # Scatterplot plot(USArrests$Assault, USArrests$Murder) addText(x = USArrests$Assault, y = USArrests$Murder)
Run the code above in your browser using DataLab