diff --git a/DESCRIPTION b/DESCRIPTION index c1c9b6f..c66b8a7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: flipMultivariates Type: Package Title: Multivariate models -Version: 1.2.3 +Version: 1.2.4 Author: Displayr Maintainer: Displayr Description: Multivariate models (e.g. LDA, random forest, SVM) according to the flip Project conventions. diff --git a/R/supportvectormachine.R b/R/supportvectormachine.R index 06c9b6b..ba1af71 100644 --- a/R/supportvectormachine.R +++ b/R/supportvectormachine.R @@ -25,6 +25,7 @@ #' @param ... Other arguments to be supplied to \code{\link{svm}}. #' #' @importFrom e1071 svm +#' @importFrom flipU StopForUserError #' @export SupportVectorMachine <- function(formula, data = NULL, @@ -42,8 +43,9 @@ SupportVectorMachine <- function(formula, ##### Error checking specific to this function ###### #################################################################### - if (cost <= 0) - stop("cost must be positive but is ", cost) + if (cost <= 0) { + StopForUserError("cost must be positive but is ", cost) + } #################################################################### ##### Reading in the data and doing some basic tidying ######