Skip to content

Commit

Permalink
add donttest to avoid NOTE trigger from CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
schalkdaniel committed Mar 29, 2023
1 parent a2ca90e commit 66257a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions R/plot_tensor.R
Expand Up @@ -18,16 +18,18 @@
#' Number of bins for the surface. Only applies in the case of two numerical features.
#' A smooth surface is drawn if `nbins = NULL`.
#' @examples
#' \donttest{
#' cboost = Compboost$new(data = iris, target = "Petal.Length",
#' learning_rate = 0.1)
#'
#' cboost$addTensor("Sepal.Width", "Sepal.Length", df1 = 4, df2 = 4, n_knots = 7)
#' cboost$addTensor("Sepal.Width", "Species", df1 = 4, df2 = 2, n_knots = 7)
#' cboost$addTensor("Sepal.Width", "Sepal.Length", df1 = 4, df2 = 4, n_knots = 10)
#' cboost$addTensor("Sepal.Width", "Species", df1 = 4, df2 = 2, n_knots = 10)
#'
#' cboost$train(100L)
#'
#' plotTensor(cboost, "Sepal.Width_Species_tensor", npoints = 10L)
#' plotTensor(cboost, "Sepal.Width_Sepal.Length_tensor", npoints = 10L)
#' plotTensor(cboost, "Sepal.Width_Species_tensor")
#' plotTensor(cboost, "Sepal.Width_Sepal.Length_tensor")
#' }
#' @export
plotTensor = function(cboost, tname, npoints = 100L, nbins = 15L) {
if (! requireNamespace("ggplot2", quietly = TRUE)) stop("Please install ggplot2 to create plots.")
Expand Down
10 changes: 6 additions & 4 deletions man/plotTensor.Rd

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

0 comments on commit 66257a3

Please sign in to comment.