Package ggiraphExtra contains many useful functions for exploratory plots. These functions are made by both ‘ggplot2’ and ‘ggiraph’ packages. You can make a static ggplot or an interactive ggplot by setting the parameter interactive=TRUE.
You can install package ggiraphExtra with the following command.
You can make interactive ggplot easily. You can hover the points, see the regression equations and zoom-in zoom-out with the mouse wheel.
require(ggplot2)
require(ggiraph)
require(ggiraphExtra)
ggPoints(aes(x=wt,y=mpg,color=am),data=mtcars,method="lm",interactive=TRUE)
You can draw scatter plot for binary dependent variable. The
GBSG2
data contains data of 686 observations from the
German Breast Cancer Study Group 2(GBSG2) study. You can get logistic
regression line with a jittered scatterplot by setting the parameter
method
glm
.
require(TH.data)
data(GBSG2)
ggPoints(aes(x=pnodes,y=cens),data=GBSG2,method="glm",interactive=TRUE)
Please check the vignette for “ggPoints” at http://rpubs.com/cardiomoon/231822
You can explore a data.frame with ggRadar() or ggBoxplot().
ggSpine() is a interactive ggplot version of spineplot(). Spine plots are a special cases of mosaic plots, and can be seen as a generalization of stacked (or highlighted) bar plots. Analogously, spinograms are an extension of histograms. You can add labels by setting the parameter addlabel=TRUE.
ggBar() draws interactive barplot. You can add labels, draw horizontal barplots or polar plots. You can draw histogram with ggBar()
You can draw a pie and donut plot with ggPieDonut().
You can find the full version of this vignette at http://rpubs.com/cardiomoon/231820