1
votes

I would like to use functions in the mvpart package in R. I know it has been removed from CRAN, but I tried installing archive versions available here: http://cran.r-project.org/web/packages/mvpart/index.html

install.packages("D:/mvpart_1.6-2.tar.gz", repos = NULL, type = "source")

I get this result:

Installing package into ‘C:/Users/jk/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) * installing source package 'mvpart' ... ** package 'mvpart' successfully unpacked and MD5 sums checked ** libs

*** arch - i386 Warning: running command 'make -f "C:/PROGRA~1/R/R-31~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.3/share/make/winshlib.mk" SHLIB="mvpart.dll" OBJECTS="anova.o branch.o bsplit.o choose_surg.o dist.o fix_cp.o formatg.o free_tree.o gini.o graycode.o insert_split.o make_cp_list.o make_cp_table.o mrt.o mysort.o nodesplit.o partition.o poisson.o pred_rpart.o rpart.o rpart_callback.o rpartexp2.o rpcountup.o rpmatrix.o rundown.o rundown2.o s_to_rp.o s_xpred.o surrogate.o usersplit.o vgdist.o xdiss.o xval.o"' had status 127

ERROR: compilation failed for package 'mvpart' * removing 'C:/Users/jk/Documents/R/win-library/3.1/mvpart' Warning in install.packages : running command '"C:/PROGRA~1/R/R-31~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\jk\Documents\R\win-library\3.1" "D:/mvpart_1.6-2.tar.gz"' had status 1 Warning in install.packages : installation of package ‘D:/mvpart_1.6-2.tar.gz’ had non-zero exit status

My questions are: Did I do something wrong here - is there a way to install 'mvpart'? Or, is there another package that will do multivariate partitioning, similar to 'mvpart'?

2
Do you have RTools instead and on your path?Dason

2 Answers

4
votes

Option 1:

An archive install must be compiled, as it's stored as source code. Probably, you have not installed the R Tools compiler for Windows. Follow the install instructions here.

Once that was done, for me, mvpart installed flawlessly from the downloaded archive:

install.packages("C:/mydownload/path/mvpart_1.6-2.tar.gz", repos = NULL, type = "source")

Option 2:

If Option 1 doesn't get the job done, get the devtools package:

install.packages("devtools")

Use it to get the github version:

devtools::install_github("cran/mvpart")

I believe you'll still need the R tools compiler though

0
votes

downloading Xcode from either the Apple AppStore or Apple Developer website solved my issues installing mvpart. The app version required iOS 10.13 as of this post, but it was easy to find a compatible older version on the website to download. After you download it, move it to your Applications folder and then open it. After that then the devtools:::install_github() worked for me.