View source: R/buildPlotPlotly.r
buildPlottingPloty.default | R Documentation |
Builds the plotting structure for interactive coefplots
buildPlottingPloty.default( modelCI, title = "Coefficient Plot", xlab = "Value", ylab = "Coefficient", lwdInner = 3, lwdOuter = 1, color = "blue", shape = "circle", pointSize = 8 )
modelCI |
An object created by |
title |
The name of the plot, if NULL then no name is given |
xlab |
The x label |
ylab |
The y label |
lwdInner |
The thickness of the inner confidence interval |
lwdOuter |
The thickness of the outer confidence interval |
color |
The color of the points and lines |
shape |
The shape of the points |
pointSize |
Size of coefficient point |
Uses plotly to make an interactive version of coefplot. Still uses modelCI.
a ggplot graph object
Jared P. Lander
coefplot.default
coefplot
buildPlotting.default
data(diamonds) mod1 <- lm(price ~ carat + cut, data=diamonds) theCI1 <- coefplot:::buildModelCI(mod1) coefplot:::buildPlottingPloty.default(theCI1) coefplot(mod1, interactive=TRUE) mod2 <- lm(mpg ~ cyl + qsec - 1, data=mtcars) mod3 <- lm(mpg ~ cyl + qsec + disp - 1, data=mtcars) theCI2 <- coefplot:::buildModelCI(mod2) theCI3 <- coefplot:::buildModelCI(mod3) coefplot::buildPlottingPloty.default(theCI2) coefplot::buildPlottingPloty.default(theCI3) coefplot(mod2, interactive=TRUE) coefplot(mod3, interactive=TRUE) mod4 <- glmnet::glmnet( x=as.matrix(diamonds[, c('carat', 'x', 'y', 'z')]), y=diamonds$price ) coefplot(mod4, interactive=TRUE, lambda=0.65)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.