From 6f19a169c2c10d11afe7d7a2c8d8eb3e14216dd4 Mon Sep 17 00:00:00 2001 From: wendycwong Date: Fri, 1 Nov 2024 08:56:48 -0700 Subject: [PATCH] reduce example width of hglm.R (#16446) Co-authored-by: wendycwong --- h2o-bindings/bin/custom/R/gen_hglm.py | 4 ++-- h2o-r/h2o-package/R/hglm.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/h2o-bindings/bin/custom/R/gen_hglm.py b/h2o-bindings/bin/custom/R/gen_hglm.py index 84fc2d2ce9c7..f2a5ae19f5b5 100644 --- a/h2o-bindings/bin/custom/R/gen_hglm.py +++ b/h2o-bindings/bin/custom/R/gen_hglm.py @@ -117,8 +117,8 @@ # build a HGLM model with prostate dataset prostate_path <- system.file("extdata", "prostate.csv", package = "h2o") prostate <- h2o.uploadFile(path = prostate_path) - prostate$CAPSULE <- as.factor(prostate$CAPSULE) prostate$RACE <- as.factor(prostate$RACE) - model <- h2o.hglm(y="VOL", x=c("AGE","RACE","DPROS"), random_columns = ["AGE"], group_column = "RACE", training_frame=prostate) + model <- h2o.hglm(y="VOL", x=c("AGE","RACE","DPROS"), random_columns = ["AGE"], + group_column = "RACE", training_frame=prostate) """ ) diff --git a/h2o-r/h2o-package/R/hglm.R b/h2o-r/h2o-package/R/hglm.R index 6e4fa2cbed30..dff129441944 100644 --- a/h2o-r/h2o-package/R/hglm.R +++ b/h2o-r/h2o-package/R/hglm.R @@ -67,9 +67,9 @@ #' # build a HGLM model with prostate dataset #' prostate_path <- system.file("extdata", "prostate.csv", package = "h2o") #' prostate <- h2o.uploadFile(path = prostate_path) -#' prostate$CAPSULE <- as.factor(prostate$CAPSULE) #' prostate$RACE <- as.factor(prostate$RACE) -#' model <- h2o.hglm(y="VOL", x=c("AGE","RACE","DPROS"), random_columns = ["AGE"], group_column = "RACE", training_frame=prostate) +#' model <- h2o.hglm(y="VOL", x=c("AGE","RACE","DPROS"), random_columns = ["AGE"], +#' group_column = "RACE", training_frame=prostate) #' #' } #' @export