R version 2.10.0 - How to Download and Install on Mac OS X
Friday the 3rd of September, 2010

    version 2.10.0

      View the most recent changes for the r port at: r.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for r.
      The raw portfile for r 2.10.0 is located here:
      http://r.darwinports.com/dports/math/R/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/r


      The r Portfile 60393 2009-11-10 23:48:44Z ryandesign macports.org $

      PortSystem 1.0

      Name: R
      Version: 2.10.0
      Category: math science
      Maintainers: epfl.ch:kjell.konis
      Platform: darwin

      Description: R is GNU S - an interpreted language for statistical computing

      Long Description: R is a language and environment for statistical computing and graphics. R provides a wide variety of statistical (linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible.

      Homepage: http://www.r-project.org/

      Master Sites: http://cran.us.r-project.org/src/base/R-2/ http://cran.ms.unimelb.edu.au/src/base/R-2/ http://cran.at.r-project.org/src/base/R-2/ http://cran.hu.r-project.org/src/base/R-2/ http://cran.r-project.org/src/base/R-2/

      Checksums: md5 4486934883b1dbcd5400135e22b26a75 sha1 72249c2fd4dc88d76f775c06b0336c8f934fb358 rmd160 a0d335f99d744eba4f03b2082f6e71f1e9269399

      depends_lib port:gettext port:icu path:lib/pkgconfig/glib-2.0.pc:glib2 port:jpeg port:libiconv path:lib/pkgconfig/pango.pc:pango port:readline port:tcl port:tk port:tiff port:xorg-libXmu port:xorg-libXScrnSaver

      universal_variant no

      platform darwin 9 {
      patchfiles patch-configure.diff
      }

      platform darwin 10 {
      patchfiles patch-configure.diff
      }

      Variant: gcc42 description {Build with gcc42} {
      configure.compiler macports-gcc-4.2
      depends_lib-append port:gcc42
      }

      Variant: gcc43 description {Build with gcc43} {
      configure.compiler macports-gcc-4.3
      depends_lib-append port:gcc43
      }

      if {![variant_isset gcc42] && ![variant_isset gcc43]} {
      default_variants +gcc43
      }

      post-extract {
      reinplace "s|R_HOME|\"${prefix}/lib/R\"|" ${worksrcpath}/src/unix/Rscript.c
      }

      configure.args --mandir=\\\${prefix}/share/man --enable-R-shlib --disable-nls --without-libintl-prefix --disable-R-framework --without-aqua --with-tcl-config=${prefix}/lib/tclConfig.sh --with-tk-config=${prefix}/lib/tkConfig.sh --x-include=${prefix}/include --x-lib=${prefix}/lib

      test.run yes
      test.target check
      destroot.destdir prefix=${destroot}${prefix}

      post-destroot {
      foreach r { "/bin/R" "/lib/R/bin/R" } {
      foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
      reinplace "s|${dir}=${destroot}|${dir}=|" "${destroot}${prefix}${r}"
      }
      }

      foreach v { "rhome" "rincludedir"} {
      reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
      }
      }

      platform darwin 8 {
      post-destroot {
      foreach r { "/bin/R" "/lib/R/bin/R" } {
      foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
      reinplace "s|${dir}=${destroot}|${dir}=|" "${destroot}${prefix}${r}"
      }
      }

      foreach v { "rhome" "rincludedir"} {
      reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
      }

      system "install_name_tool -id ${prefix}/lib/R/lib/libR.dylib ${destroot}${prefix}/lib/R/lib/libR.dylib"
      system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib ${destroot}${prefix}/lib/R/lib/libR.dylib"

      system "install_name_tool -id ${prefix}/lib/R/lib/libRblas.dylib ${destroot}${prefix}/lib/R/lib/libRblas.dylib"

      system "install_name_tool -id ${prefix}/lib/R/lib/libRlapack.dylib ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
      system "install_name_tool -change libRblas.dylib ${prefix}/lib/R/lib/libRblas.dylib ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"
      system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib ${destroot}${prefix}/lib/R/lib/libRlapack.dylib"

      foreach so [ exec find ${destroot}${prefix}/lib/R -name "\*.so" ] {
      regsub ":$" ${so} "" destroot_so_path
      regsub ${destroot} ${destroot_so_path} "" so_path
      system "install_name_tool -id ${so_path} ${destroot_so_path}"
      system "install_name_tool -change libR.dylib ${prefix}/lib/R/lib/libR.dylib ${destroot_so_path}"
      }
      }
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/r
      % sudo port install r
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching r
      ---> Verifying checksum for r
      ---> Extracting r
      ---> Configuring r
      ---> Building r with target all
      ---> Staging r into destroot
      ---> Installing r
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using r with these commands:
      %  man r
      % apropos r
      % which r
      % locate r

     Where to find more information:

    Darwin Ports



    Lightbox this page.