From 5a78118396b834d7da354d92c835d40dfeb4a0eb Mon Sep 17 00:00:00 2001 From: Vadim Khotilovich Date: Mon, 2 May 2016 01:01:22 -0500 Subject: [PATCH] use short-circuiting scalar && --- R-package/R/xgb.Booster.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R-package/R/xgb.Booster.R b/R-package/R/xgb.Booster.R index 1994d82a78cb..0c17c0ebbf71 100644 --- a/R-package/R/xgb.Booster.R +++ b/R-package/R/xgb.Booster.R @@ -197,7 +197,7 @@ xgb.attr <- function(object, which) { handle = xgb.get.handle(object, "xgb.attr") # TODO: setting NULL value to remove an attribute .Call("XGBoosterSetAttr_R", handle, as.character(which)[1], as.character(value)[1], PACKAGE="xgboost") - if (is(object, 'xgb.Booster') & !is.null(object$raw)) { + if (is(object, 'xgb.Booster') && !is.null(object$raw)) { object$raw <- xgb.save.raw(object$handle) } object