creating a package to add a menu to Deducer

36 views
Skip to first unread message

Vincent

unread,
Oct 13, 2012, 2:53:37 AM10/13/12
to ded...@googlegroups.com
I am planning to use Deducer/R/JGR for my class at UCSD. I have a source file that works (i.e., creates the menu etc.) but I would like to put this in a package that will be automatically loaded when JGR is opened (for both Windows and PC).

I downloaded the source package for DeducerPluginExample but can't install from source (see message [1] below). If I try R CMD check on the source package I get the attached errors. 

Note: I also tried to at a .First function to .Rprofile to source the code but that doesn't work when you just open JGR. I'm working on a Mac.

The Deducer wiki has a section 'Wrapping it up into a package' but this provide enough information to actually make the package. At least not for me :)


[1] 'Warning message:
In install.packages("Desktop/DeducerPlugInExample_0.2-0.tar.tar.gz",  :
  installation of package 'Desktop/DeducerPlugInExample_0.2-0.tar.tar.gz' had non-zero exit status)

[2] R CMD check DeducerPlugInExample* using log directory ‘/Users/vincentnijs/Desktop/DeducerPlugInExample.Rcheck’
* using R version 2.15.1 (2012-06-22)
* using platform: x86_64-apple-darwin9.8.0 (64-bit)
* using session charset: UTF-8
* checking for file ‘DeducerPlugInExample/DESCRIPTION’ ... OK
* this is package ‘DeducerPlugInExample’ version ‘0.2-0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package ‘DeducerPlugInExample’ can be installed ... ERROR
Installation failed.

* installing *source* package ‘DeducerPlugInExample’ ...
** package ‘DeducerPlugInExample’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Note: On Mac OS X we strongly recommend using iplots from within JGR.
Proceed at your own risk as iplots cannot resolve potential ev.loop deadlocks.
'Yes' is assumed for all dialogs as they cannot be shown without a deadlock,
also ievent.wait() is disabled.
2012-10-12 23:25:50.409 R[2153:60f] Apple AWT Java VM was loaded on first thread -- can't start AWT.
Error : .onLoad failed in loadNamespace() for 'iplots', details:
  call: .jnew("org/rosuda/iplots/Framework")
  error: java.lang.InternalError: Can't start the AWT because Java was started on the first thread.  Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line
Error : package ‘iplots’ could not be loaded
ERROR: lazy loading failed for package ‘DeducerPlugInExample’

Ian Fellows

unread,
Oct 13, 2012, 3:38:27 AM10/13/12
to ded...@googlegroups.com
Hi Vincent,

As per:
http://www.deducer.org/pmwiki/pmwiki.php?n=Main.BuildingDeducerFromTheSource

On the mac you need to set an environmental variable to install from
source. either do

NOAWT=1 R CMD INSTALL ...

or from within R

Sys.setenv(NOAWT=1)
install.packages(...)


ian

Vincent

unread,
Oct 26, 2012, 12:29:07 AM10/26/12
to ded...@googlegroups.com
Works great. Thanks Ian.
Reply all
Reply to author
Forward
0 new messages