ggScatter: Make an interactive scatterplot

Description Usage Arguments Methods (by class) Examples

Description

Make an interactive scatterplot

Usage

1
2
3
4
5
6
7
8
9
ggScatter(x, ...)

## Default S3 method:
ggScatter(x, yvar, xvar, colorvar = NULL, fillvar = NULL,
  facetvar = NULL, se = TRUE, method = "auto", fullrange = FALSE,
  maxfactorno = 6, digits = 2, tooltip = NULL, interactive = FALSE, ...)

## S3 method for class 'formula'
ggScatter(x, data, ...)

Arguments

x

An R object to ggPoints

...

other arguments passed on to geom_point

yvar

A character string of column name be used as a y-axis variable.

xvar

A character string of column name be used as a x-axis variable

colorvar

A character string of column name be used as a colour variable. Default value is NULL

fillvar

A character string of column name be used as a fill variable. Default value is NULL

facetvar

A character string of column name be used as a facet variable. Default value is NULL

se

Logical. display confidence interval around linear regression? (TRUE by default)

method

smoothing method (function) to use, eg. "lm", "glm", "gam", "loess", "rlm"

fullrange

should the fit span the full range of the plot, or just the data

tooltip

A character string of column name be included in tooltip. Default value is NULL

interactive

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

data

a data.frame

x

A data.frame

x

A formula of type y ~ x | B

data

A data.frame

...

other arguments passed on to ggScatter.defalut

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(moonBook)
require(ggplot2)
require(ggiraph)
ggScatter(iris,yvar="Sepal.Width",xvar="Sepal.Length",method="lm",interactive=TRUE)
ggScatter(iris,yvar="Sepal.Width",xvar="Sepal.Length",se=FALSE,colorvar="Species",interactive=TRUE)
ggScatter(acs,yvar="weight",xvar="height",colorvar="Dx",facetvar="Dx",se=FALSE,method="lm",interactive=TRUE)
ggScatter(iris,yvar="Sepal.Width",xvar="Sepal.Length",colorvar="Species",interactive=TRUE)
ggScatter(radial,yvar="NTAV",xvar="age",colorvar="DM",facetrvar="DM",interactive=TRUE)
require(moonBook)
ggScatter(weight~height|sex,data=radial,interactive=TRUE)
ggScatter(weight~height|sex,data=radial,fullrange=TRUE,se=FALSE,interactive=TRUE)
ggScatter(weight~height,data=radial,interactive=TRUE)

cardiomoon/moonBook2 documentation built on May 13, 2019, 12:40 p.m.