Building R igraph package in Win7

后端 未结 1 920
暖寄归人
暖寄归人 2021-01-15 19:58

I made a small change to the source code of the igraph package because I want to implement the forest fire method based on the breadth first search method.

相关标签:
1条回答
  • 2021-01-15 20:18

    You can build it at http://win-builder.r-project.org/upload.aspx, just don't forget to change the DESCRIPTION file to include your email address as maintainer.

    It is actually quite tricky to build it because Rtools has some fixed (?) paths and it is looking for libraries at specific places, so you need to put them there. We build it with something like

    ...
    if ! (subst | grep -qi ^d:); then
      subst d: c:\\
    fi
    
    pkg=`ls igraph*.tar.gz`
    zip=`echo $pkg | sed 's/.tar.gz/.zip/'`
    rfile="r-win/${zip}"
    
    OLDPATH=$PATH
    PATH=/cygdrive/c/Program\ Files/R/R-default/bin:/cygdrive/c/Rtools/bin:/cygdrive/c/Rtools/gcc-4.6.3/bin:$PATH
    
    LIB_XML=c:/RCompile/CRANpkg/extralibs64/local R CMD INSTALL -l . $pkg
    zip -r ${zip} igraph
    PATH=$OLDPATH
    ...
    

    This uses a cygwin shell. You can get the extra libraries here: http://www.stats.ox.ac.uk/pub/Rtools/libs.html

    0 讨论(0)
提交回复
热议问题