Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
- Added anticlust to DESCRIPTION
- vis_rset: added viewing angle as the other argument
  • Loading branch information
Insang Song committed Jun 13, 2024
1 parent a994322 commit d0fa822
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Imports:
parsnip,
future.apply,
future.batchtools,
anticlust,
qs,
stringi,
collapse,
Expand Down
6 changes: 4 additions & 2 deletions R/pipeline_base_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -2686,11 +2686,12 @@ generate_cv_index <-
#' Visualize the spatio-temporal cross-validation index
#' @family Base learner
#' @param rsplit rsample::manual_rset() object.
#' @param angle numeric(1). Viewing angle of 3D plot.
#' @returns None. A plot will be generated.
#' @seealso [`generate_cv_index`]
#' @export
vis_rset <-
function(rsplit) {
function(rsplit, angle = 60) {
nsplit <- nrow(rsplit)
par(mfrow = c(ceiling(nsplit / 3), 3))
for (i in seq_len(nsplit)) {
Expand All @@ -2703,7 +2704,8 @@ vis_rset <-
scatterplot3d::scatterplot3d(
cleared$lon, cleared$lat, cleared$time,
color = rev(as.integer(cleared$indx) + 1),
cex.symbols = 0.02, pch = 19
cex.symbols = 0.02, pch = 19,
angle = angle
)
}
}
Expand Down
4 changes: 3 additions & 1 deletion man/vis_rset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0fa822

Please sign in to comment.