ggplot-method {visa}R Documentation

Plot functions

Description

This functions plots model fit using ggplot.

Usage

## S3 method for class 'lmfit'
ggplot(x, y, ..., environment = parent.frame())

Arguments

x, y

Two vectors

...

Other arguments passed on to methods. Not currently used.

environment

If an variable defined in the aesthetic mapping is not found in the data, ggplot will look for it in this environment. It defaults to using the environment in which ggplot() is called.

Details

Visualization of linear fit (y = ax + b), using scatter plots and with regression line, as well as added details of regression equation and R^2.

Value

p

Returns a ggplot object.

Examples

library(visa)
x <- 1:10
y <- 2:11+0.5
ggplot.lmfit(x, y)


[Package visa version 0.1.0 Index]