[Insight-developers] SimpleITK - does testing work with R?

Luis Ibanez luis.ibanez at kitware.com
Fri Mar 25 09:48:59 EDT 2011


Hi Brad,

Yes, the creation of the R package
s still done in a manual way.


Here is the black magic recipe:


1)  Make sure that you are using SWIG 2.0

     Here are the SWIG variables from my cache.

 SWIG_DIR                         /home/ibanez/local/share/swig/2.0.1
 SWIG_EXECUTABLE       /home/ibanez/local/bin/swig
 SWIG_VERSION                     2.0.1


2) Turn on R wrapping

                             WRAP_R


3)  Here are the R variables from my cache


 RSCRIPT_EXECUTABLE               /usr/bin/Rscript
 R_COMMAND                        /usr/bin/R
 R_HOME                           /usr/lib64/R
 R_INCLUDE_DIR                    /usr/share/R/include
 R_LIBRARY_BASE                   /usr/lib64/R/lib/libR.so
 R_LIBRARY_READLINE               /usr/lib/libreadline.so

I'm using the installed Ubuntu R packages in this case.


4)  Finally, for creating the R-Package,
      we follow a recipe that we listed in the file:

   SimpleITK/Documentation/Doxygen/Wrapping.dox

 In the "R" section.

Please note that we wrote those instructions from the
context of our total "R" ignorance. They should get
refined as we learn how to create R packages
correctly.


At some point we should encode all this process as
CMake custom commands.


   Let me know if you run into any problems,


      Thanks


         Luis


--------------------------------------------------------------------------
On Fri, Mar 25, 2011 at 9:04 AM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Luis,
> I just download and installed R. When I can build SimpleITK just fine when
> it's the only the R language enabled. However, when I perform the testing it
> appears that all the R tests are failing. With the following:
> Running command: '/usr/bin/Rscript
> /scratch/blowekamp/build/SimpleITK-gcc/Testing/Unit/RTests/AddImageFilterTest.R
> 2d /nfs/Users/blowekamp/src/SimpleITK/Testing/Data/Input/STAPLE1.png
> /nfs/Users/blowekamp/src/SimpleITK/Testing/Data/Input/STAPLE2.png
> /scratch/blowekamp/build/SimpleITK-gcc/Testing/Temporary/R-Add-2d.nrrd '
> 104: Error in library(SimpleITK) : there is no package called 'SimpleITK'
> 104: Execution halted
>
> There is quite a lengthy description of things here:
> http://erie.nlm.nih.gov/~blowek1/SimpleITK/Wrapping.html
> Do I need to do all that for testing? or is that more installation?
> Additionally, there the R binding appear to generate "bin/libSimpleITK.so"
> this is conflicting with another language and is problematic with building
> multiple languages at the same time.
> Any ideas how to get R testing?
> Brad
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>


More information about the Insight-developers mailing list