library(spinifex)
message("It's suggested to switch to the proto api, see `?ggtour` to get started.")
## Setup
dat_std <- scale_sd(wine[, 2:6])
clas <- wine$Type
bas <- basis_pca(dat_std)
mv <- manip_var_of(bas)
## Minimal example
# \donttest{
suppressWarnings(
view_frame(basis = bas)
)
## Typical example
suppressWarnings(
view_frame(basis = bas, data = dat_std, manip_var = mv, axes = "left")
)
## Full example
rtheta <- runif(1, 0, 2 * pi)
rphi <- runif(1, 0, 2 * pi)
suppressWarnings(
view_frame(
basis = bas, data = dat_std, manip_var = mv,
theta = rtheta, phi = rphi, basis_label = paste0("MyNm", 1:ncol(dat_std)),
aes_args = list(color = clas, shape = clas),
identity_args = list(size = 1.5, alpha = .7))
)
# }
Run the code above in your browser using DataLab