plotCor: scatter plot with correlation statistics

View source: R/plotUtils.R

plotCorR Documentation

scatter plot with correlation statistics

Description

scatter plot with correlation statistics

Usage

plotCor(
  x,
  y,
  outliers,
  cor.method = c("pearson", "kendall", "spearman"),
  line.methods = c("ols", "tls"),
  na.rm = TRUE,
  circular = FALSE,
  cor.legend = TRUE,
  line.col = c(1, 2),
  pch = 20,
  cex = 1,
  legpos,
  signif = 1,
  round = 1,
  density = TRUE,
  ...
)

Arguments

x

the x coordinates of the points in the plot.

y

the y coordinates of the points in the plot.

outliers

vector of indices or logical vector of x,y values to exclude from correlation analysis.

cor.method

method to calculate correlation and p-value via cor.test.

line.methods

regression line methods, where "ols" is a linear regression (ordinary least squares) with R's lm and "tls" (total least squares) is calculated manually via eigen and cov.

na.rm

remove NA values from x and y.

circular

NOT fully implement, treat data as circular.

cor.legend

plot correlation, p-value and slope (TLS) as a legend.

line.col

colors of the regression lines drawn with line.methods.

pch

point symbols.

cex

point size.

legpos

position of the legend.

signif

number of digits to be shown for p-values in the plot legend (argument digits to signif.

round

number of decimal places to be shown for correlation values in the plot legend (argument digits to round.

density

indicate local point densities by using dense2d instead of the base plot function.

...

further arguments to the plotting function; plot or, if density=TRUE, dense2d.


raim/segmenTools documentation built on April 30, 2024, 4:53 a.m.