为具有RGtk2依赖关系的CRAN创建一个程序包

时间:2018-06-29 22:33:26

标签: r devtools gwidgets

我正在使用具有gWidgets2,gWidgets2RGtk和RGtk2作为依赖项的GUI创建一个包。我正在使用devtools并在Rstudio中工作。适用于Windows的R版本3.4.2。假设代码看起来像这样:

#'@import gWidgets2
#'@import gWidgets2RGtk2
mynewfunction<-function(){
options(guiToolkit="RGtk2")
win <- gwindow ("MR.loops.gui")
g0 <- ggroup(container = win, horizontal = F, use.scrollwindow= T)
gp0a <- ggroup(cont = g0, horizontal = F, use.scrollwindow = F)
    widget1 <- gbutton("Create 'MR.loops' object for review", container = g0,
                   handler = function(h,...){
                   print(svalue(x))
                 }
    tmp <- gframe("DO Variable Name", container = gp1)
    x <- gedit("", container = tmp)

}

然后我跑:

devtools::check()

我得到:

   * checking whether package 'rMR' can be installed ...Warning: running 
command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/Rcmd.exe" INSTALL -l 
"C:/Users/tyler/AppData/Local/Temp/Rtmpm6W5k4/rMR.Rcheck" --no-html 
"C:\Users\tyler\AppData\Local\Temp\RTMPM6~1\RMR~1.RCH\00_PKG~1\rMR"' had 
status 1 ERROR
Installation failed.
See 'C:/Users/tyler/AppData/Local/Temp/Rtmpm6W5k4/rMR.Rcheck/00install.out' 
for details.
* DONE

我在哪里找到

Error in inDL(x, as.logical(local), as.logical(now), ...) : 
unable to load shared object 



'C:/Users/tyler/AppData/Local/Temp/RtmpYNkFXx/RLIBS_4c4604b64e9/RGtk2/libs/ 
 i386/RGtk2.dll':
 LoadLibrary failure:  The specified module could not be found.

似乎可能要我安装GTK,但我不知道如何从R中进行安装,更不用说将该安装合并到软件包中了。任何帮助,将不胜感激!

谢谢!

-泰勒

0 个答案:

没有答案