scatter: scatterplot with information on the errors between x and y.

Description Usage Arguments Value References Examples

Description

This is a direct call to scatter.This scatterplot is a wrapper function for a ggplot-based plot. It contains additional text panel that shows values calculated with calc.error

Usage

1
2
3
4
5
scatter(x, y, R2 = T, axisorder = "OP", xlab = "Observed",
  ylab = "Predicted", title = NULL, info = T, position = 0,
  positionauto = T, lowerlimit = NA, upperlimit = NA, alpha = 1,
  normality = T, add.reg.line = F, rug = F, label_text = c("n",
  "bias", "bias%", "RMSE", "RMSE%", "p-value"))

Arguments

x

a vector of observed data.

y

a vector of predicted data.

R2

Optional. Can be enabled or disabled by setting TRUE/FALSE. Can also be a value in cases where the R2 is calculated by other function.

axisorder

Optional. Set to PO (predicted-observed) to plot predicted (y) on the y-axis (this is the default). Set to OP (observed-predicted) to plot observed (x) on the y-axis.

xlab

Optional. Title of the x-axis

ylab

Optional. Title of the y-axis

info

A logical value indicating whether information on count, bias and RMSE should be added to the plot.

position

Determines the position of the info box

positionauto

A logical value indicating whether the position of the info box should be optimized automatically.

lowerlimit

A value determining the lower limit of the x and y axis

upperlimit

A value determining the upper limit of the x and y axis

alpha

Define the transparency of the points. 0 - fully transparent, 1 - opaque.

add.reg.line

Logical. Should the regression line be added to the plot? Regression coefficients are calculated automatically.

rug

Logical. Add marginal rug to the plot.

label_text

A character vector of length=5 defining the names for the values in the info box.

Value

a scatterplot of x and y.

References

https://github.com/ptompalski/scatter

Examples

1
2
3
x <- iris$Sepal.Length
y <- predict(lm(data=iris,iris$Sepal.Length~iris$Petal.Width))
scatter(x,y)

mqueinnec/foster documentation built on June 3, 2019, 4:22 a.m.