一、问题
我在运行是python调用R包出现以下问题:
不存在叫'mclust'这个名字的程辑包
二、解决
1、镜像网站
打开RStudio,在工具栏选择 Tools —> global option —> packages —>选择中科大或清华
2、安装包
install.packages("caret", dependencies = c("Depends", "Suggests"))
安装的时间大约五十分钟,你也可以选择安装所需要的,我是防止以后再用到,就把下面包含的都安装了:
依赖包如下:
dependencies ‘doMC’, ‘rpvm’, ‘Rcompression’, ‘RMySQL’, ‘globaltest’, ‘OpenMx’, ‘pryr’, ‘gpclib’, ‘marray’, ‘affy’, ‘Biobase’, ‘RSVGTipsDevice’, ‘rhdf5’, ‘graph’, ‘ncdf4’, ‘Rgraphviz’ are not available
also installing the dependencies ‘latticeExtra’, ‘slam’, ‘geoRglm’, ‘vioplot’, ‘ncdf’, ‘rasterVis’, ‘Rglpk’, ‘Rsymphony’, ‘BRugs’, ‘rjags’, ‘optextras’, ‘svGUI’, ‘misc3d’, ‘geoR’, ‘denstrip’, ‘raster’, ‘polyclip’, ‘relations’, ‘igraphdata’, ‘R2WinBUGS’, ‘SuppDists’, ‘numDeriv’, ‘gamm4’, ‘betareg’, ‘maxlike’, ‘R2jags’, ‘R2OpenBUGS’, ‘BB’, ‘ucminf’, ‘Rcgmin’, ‘Rvmmin’, ‘minqa’, ‘setRNG’, ‘dfoptim’, ‘svUnit’, ‘mapdata’, ‘sm’, ‘rpanel’, ‘tkrplot’, ‘RandomFields’, ‘deldir’, ‘clue’, ‘igraph’, ‘emdbook’, ‘MuMIn’, ‘AICcmodavg’, ‘optimx’, ‘gmp’, ‘rgdal’, ‘gstat’, ‘spatstat’, ‘PBSmapping’, ‘flexclust’, ‘isa2’, ‘bbmle’, ‘Rmpfr’, ‘partitions’, ‘polynom’, ‘rugarch’, ‘mvnormtest’, ‘pkgKitten’, ‘combinat’, ‘RItools’, ‘rgenoud’, ‘rbounds’, ‘inline’, ‘forward’, ‘RDCOMClient’, ‘mapproj’, ‘linprog’, ‘scalreg’, ‘sp’, ‘maptools’, ‘biclust’, ‘MplusAutomation’, ‘GPArotation’, ‘mnormt’, ‘copula’, ‘png’, ‘RcppArmadillo’, ‘hexbin’, ‘CompQuadForm’, ‘cem’, ‘optmatch’, ‘Matching’, ‘WhatIf’, ‘BMA’, ‘DescTools’, ‘maps’, ‘gridBase’, ‘hdi’, ‘spam’, ‘shapefiles’, ‘spdep’, ‘rgeos’, ‘seriation’, ‘lavaan.survey’, ‘semPlot’, ‘semTools’, ‘simsem’, ‘Cairo’, ‘markdown’, ‘Amelia’, ‘survey’, ‘MatchIt’, ‘pcaPP’, ‘relimp’, ‘Ecfun’, ‘gdata’, ‘gnm’, ‘ca’, ‘gmodels’, ‘Fahrmeir’, ‘Sleuth2’, ‘stabs’, ‘fields’, ‘BayesX’, ‘gbm’, ‘snowfall’, ‘corrplot’, ‘corpcor’, ‘gsl’, ‘lavaan’, ‘arm’, ‘DBI’, ‘RSQLite’, ‘RODBC’, ‘shiny’, ‘bitops’, ‘AGD’, ‘mitools’, ‘pan’, ‘Zelig’, ‘rrcov’, ‘lokern’, ‘qvcalc’, ‘glmmML’, ‘Ecdat’, ‘geepack’, ‘ordinal’, ‘vcdExtra’, ‘glmnet’, ‘mboost’, ‘lqa’, ‘lpSolve’, ‘GAMBoost’, ‘penalized’, ‘TTR’, ‘gamlss.data’, ‘candisc’, ‘corrgram’, ‘FRB’, ‘animation’, ‘miscTools’, ‘VGAMdata’, ‘polycor’, ‘MBESS’, ‘mi’, ‘quadprog’, ‘biglm’, ‘tripack’, ‘logspline’, ‘nor1mix’, ‘MatrixModels’, ‘Formula’, ‘testit’, ‘rmarkdown’, ‘XML’, ‘RCurl’, ‘rms’, ‘mice’, ‘tables’, ‘robust’, ‘fit.models’, ‘MPV’, ‘sfsmisc’, ‘catdata’, ‘quantmod’, ‘gamlss’, ‘gamlss.dist’, ‘gplots’, ‘fBasics’, ‘poLCA’, ‘heplots’, ‘maxLik’, ‘MCMCpack’, ‘VGAM’, ‘sem’, ‘locfit’, ‘expm’, ‘diptest’, ‘mgcv’, ‘mix’, ‘bdsmatrix’, ‘kinship2’, ‘leaps’, ‘oz’, ‘quantreg’, ‘knitr’, ‘Hmisc’, ‘date’, ‘robustbase’, ‘PerformanceAnalytics’, ‘fTrading’, ‘reshape’, ‘effects’, ‘ineq’, ‘mlogit’, ‘np’, ‘plm’, ‘pscl’, ‘ROCR’, ‘sampleSelection’, ‘systemfit’, ‘rgl’, ‘truncreg’, ‘urca’, ‘TSA’, ‘ape’, ‘flexmix’, ‘gee’, ‘mclust’, ‘rmeta’, ‘coxme’, ‘SimComp’, ‘ISwR’, ‘rlecuyer’, ‘rsprng’, ‘nws’, ‘coda’, ‘chron’, ‘DAAG’, ‘fts’, ‘its’, ‘mondate’, ‘timeDate’, ‘timeSeries’, ‘tis’, ‘tseries’, ‘xts’, ‘lmtest’, ‘AER’, ‘dynlm’, ‘HSAUR’, ‘coin’, ‘multcomp’, ‘snow’, ‘RUnit’, ‘gclus’, ‘SparseM’, ‘xtable’, ‘plotmo’, ‘plotrix’, ‘akima’, ‘mvtnorm’, ‘TH.data’, ‘scatterplot3d’, ‘som’, ‘zoo’, ‘sandwich’, ‘strucchange’, ‘modeltools’, ‘vcd’, ‘Rmpi’, ‘microbenchmark’, ‘logcondens’, ‘doSNOW’, ‘cba’, ‘testthat’, ‘e1071’, ‘earth’, ‘fastICA’, ‘gam’, ‘ipred’, ‘kernlab’, ‘klaR’, ‘ellipse’, ‘mda’, ‘party’, ‘pls’, ‘pROC’, ‘proxy’, ‘randomForest’, ‘RANN’, ‘spls’
安装过程
3、检验
检验mclust是否安装成功,使用library(mclust).