安装包时R中的错误:有光泽或java_home的问题?是由于opensteetmap?

问题描述 投票:0回答:1

不幸的是,我是R的新手,但我需要它来打开一个应该是图形用户界面的特定文件。源命令后:

source("D:\\R\\win-library\\3.5\\muxViz-master\\muxVizGUI.R")

我遇到这个错误:

"Installing package into ‘D:/R/win-library/3.5’
(as ‘lib’ is unspecified)

Warning: package ‘shiny’ is in use and will not be installed

Carico il pacchetto richiesto: OpenStreetMap

Error: package or namespace load failed for ‘OpenStreetMap’:
 .onLoad failed in loadNamespace() for 'rJava', details:

  call: fun(libname, pkgname)

  error: JAVA_HOME cannot be determined from the Registry

Installing package into ‘D:/R/win-library/3.5’
(as ‘lib’ is unspecified)

provo con l'URL 'https://cran.stat.unipd.it/bin/windows/contrib/3.5/OpenStreetMap_0.3.3.zip'

Content type 'application/zip' length 2264648 bytes (2.2 MB)
downloaded 2.2 MB

package ‘OpenStreetMap’ successfully unpacked and MD5 sums checked


The downloaded binary packages are in
        C:\Users\Camla\AppData\Local\Temp\RtmpE9NQB2\downloaded_packages

shinyAppDir(x)中的错误:应用程序目录必须包含app.R或server.R。“

该目录的内容来自http://github.com/manlius/muxViz

请帮忙。

r shiny openstreetmap
1个回答
0
投票

muxVizGUI.R的最后一行是runApp(getwd())。它希望您的工作目录与ui.Rserver.R文件所在的目录相同。在获取文件之前,您应该切换到该目录:

setwd("D:\\R\\win-library\\3.5\\muxViz-master")
source("muxVizGUI.R")
© www.soinside.com 2019 - 2024. All rights reserved.