我下载了rJava
软件包rJava_1.0-6.tar.gz
并尝试在本地安装它:
install.packages('rJava_1.0-6.tar.gz', repos = NULL, type = "source")
我得到以下错误:
Installing package into ‘C:/some_project_path/renv/library/R-4.0/x86_64-w64-mingw32’
(as ‘lib’ is unspecified)
Error in startsWith(contriburl, "file:") : non-character object(s)
我认为这是由于renv
并尝试过:
renv::install('rJava_1.0-6.tar.gz', type = 'source')
但回来了:
Error: failed to resolve remote 'rJava_1.0-6.tar.gz' -- failed to parse remote spec 'rJava_1.0-6.tar.gz'
更新:
traceback()
返回后install.packages('rJava_1.0-6.tar.gz', repos = NULL, type = "source")
:
6: startsWith(contriburl, "file:")
5: utils::install.packages(pkgs = pkgs, lib = lib, repos = repos,
contriburl = contriburl, method = method, available = available,
destdir = destdir, dependencies = dependencies, type = type,
configure.args = configure.args, configure.vars = configure.vars,
clean = clean, Ncpus = Ncpus, verbose = verbose, libs_only = libs_only,
INSTALL_opts = INSTALL_opts, quiet = quiet, keep_outputs = keep_outputs,
...)
4: eval(call, envir = parent.frame())
3: eval(call, envir = parent.frame())
2: delegate(utils::install.packages)
1: install.packages("rJava_1.0-6.tar.gz", repos = NULL, type = "source")
list.files()
显示我的文件"rJava_1.0-6.tar.gz"