From 14ca5daf8aeb6fde3138a8032ef7653fd9727d41 Mon Sep 17 00:00:00 2001 From: Boyuan Ning <73546421+ningboyuan@users.noreply.github.com> Date: Sat, 12 Mar 2022 23:28:35 +0100 Subject: [PATCH] Update MVACARTBan1.r --- QID-1707-MVACARTBan1/MVACARTBan1.r | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/QID-1707-MVACARTBan1/MVACARTBan1.r b/QID-1707-MVACARTBan1/MVACARTBan1.r index 1947867..948f216 100644 --- a/QID-1707-MVACARTBan1/MVACARTBan1.r +++ b/QID-1707-MVACARTBan1/MVACARTBan1.r @@ -4,12 +4,16 @@ rm(list = ls(all = TRUE)) graphics.off() # install and load packages -libraries = c("mvpart") -lapply(libraries, function(x) if (!(x %in% installed.packages())) { - install.packages(x) -}) -lapply(libraries, library, quietly = TRUE, character.only = TRUE) +# libraries = c("mvpart") +# lapply(libraries, function(x) if (!(x %in% installed.packages())) { +# install.packages(x) +# }) +# lapply(libraries, library, quietly = TRUE, character.only = TRUE) +install.packages("devtools") +devtools::install_github("cran/mvpart") +library(mvpart) + # load data x = read.table("bankruptcy.dat") xx = data.frame(x)