Learn R Programming

ggiraphExtra (version 0.1.0)

ggAncova: Make an interactive plot for an ANCOVA model

Description

Make an interactive plot for an ANCOVA model

Usage

ggAncova(x, ...)

# S3 method for default ggAncova(x, mapping, ...)

# S3 method for formula ggAncova(x, data, ...)

# S3 method for lm ggAncova(x, label = NULL, digits = 1, interactive = FALSE, ...)

Arguments

x

an object

...

additional arguments passed to the generic function

mapping

Set of aesthetic mappings created by aes or aes_.

data

a data.frame

label

A character string of column name be assigned to the label

digits

An integer indicating the number of decimal places

interactive

A logical value. If TRUE, an interactive plot will be returned

Methods (by class)

  • default: Make an interactive plot for an ANCOVA model

  • formula: Make an interactive plot for an ANCOVA model

  • lm: Make an interactive plot for an ANCOVA model

Examples

Run this code
# NOT RUN {
require(moonBook)
require(ggplot2)
require(ggiraph)
ggAncova(radial,aes(age,NTAV,color=sex),interactive=TRUE)
fit=lm(NTAV~age+HBP,data=radial)
ggAncova(fit,interactive=TRUE)
ggAncova(NTAV~age+DM,data=radial)
# }

Run the code above in your browser using DataLab