| Type: | Package |
| Title: | Generalized Additive Models with Hyper Column |
| Version: | 0.3.1 |
| Date: | 2026-06-13 |
| Description: | An interactive HTML widget of the perspective plot for generalized additive models. An alternative solution of the function mgcv::vis.gam(). The author has retired from academic research. Accordingly, this package should not be considered a validated tool for use in peer-reviewed publications or as the basis for grant applications. |
| Encoding: | UTF-8 |
| License: | GPL-2 |
| Language: | en-US |
| URL: | https://github.com/tingtingzhan/hyper.gam, https://tingtingzhan-btaf430.netlify.app |
| Depends: | R (≥ 4.6) |
| Imports: | cli, mgcv, plotly |
| Suggests: | htmlwidgets |
| Config/roxygen2/version: | 8.0.0 |
| Config/roxygen2/markdown: | TRUE |
| NeedsCompilation: | no |
| Packaged: | 2026-06-13 22:30:08 UTC; tingtingzhan |
| Author: | Tingting Zhan |
| Maintainer: | Tingting Zhan <tingtingzhan@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-06-13 22:40:02 UTC |
hyper.gam: Generalized Additive Models with Hyper Column
Description
An interactive HTML widget of the perspective plot for generalized additive models. An alternative solution of the function mgcv::vis.gam(). The author has retired from academic research. Accordingly, this package should not be considered a validated tool for use in peer-reviewed publications or as the basis for grant applications.
Author(s)
Maintainer: Tingting Zhan tingtingzhan@gmail.com (ORCID)
Authors:
Tingting Zhan tingtingzhan@gmail.com (ORCID)
Other contributors:
Erjia Cui ecui@umn.edu (ORCID) (up to v0.2.3) [contributor]
See Also
Useful links:
Alternative of vis.gam
Description
An interactive htmlwidgets of the perspective plot for gam model(s) using the package plotly.
Usage
widget_gam(
...,
formula,
newdata = data,
proj_xy = TRUE,
proj_xz = TRUE,
n = 501L,
newid = seq_len(min(3L, nrow(newdata))),
ylim = range(X[is.finite(X)], newX[is.finite(newX)]),
colorscale
)
Arguments
... |
one or more gam models based on a same data set. |
formula |
one-sided formula |
newdata |
(for future expansion) |
proj_xy |
logical scalar, whether to show
the projection to the |
proj_xz |
logical scalar, whether to show
the projection to the |
n |
integer scalar, fineness of visualization,
default value is |
newid |
integer scalar or vector,
row indices of |
ylim |
length-2 double vector,
range on |
colorscale |
see function add_surface |
Value
The function widget_gam() returns a pretty htmlwidgets created by R package plotly.
Note
The maintainer is not aware of any functionality of projection of arbitrary curves in package plotly. Currently, the projections are hard coded.
Examples
library(mgcv)
# ?s
# ?ti