aboutsummaryrefslogtreecommitdiff
path: root/R/plot.gensvm.grid.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/plot.gensvm.grid.R')
-rw-r--r--R/plot.gensvm.grid.R10
1 files changed, 5 insertions, 5 deletions
diff --git a/R/plot.gensvm.grid.R b/R/plot.gensvm.grid.R
index abb0601..6a34024 100644
--- a/R/plot.gensvm.grid.R
+++ b/R/plot.gensvm.grid.R
@@ -4,7 +4,7 @@
#' model in the provided GenSVMGrid object. See the documentation for
#' \code{\link{plot.gensvm}} for more information.
#'
-#' @param grid A \code{gensvm.grid} object trained with refit=TRUE
+#' @param x A \code{gensvm.grid} object trained with refit=TRUE
#' @param ... further arguments are passed to the plot function
#'
#' @return returns the object passed as input
@@ -31,12 +31,12 @@
#' grid <- gensvm.grid(x, y)
#' plot(grid, x)
#'
-plot.gensvm.grid <- function(grid, ...)
+plot.gensvm.grid <- function(x, ...)
{
- if (is.null(grid$best.estimator)) {
+ if (is.null(x$best.estimator)) {
cat("Error: Can't plot, the best.estimator element is NULL\n")
- return
+ return(invisible(NULL))
}
- fit <- grid$best.estimator
+ fit <- x$best.estimator
return(plot(fit, ...))
}