SourceForge has been redesigned. Learn more.

R Server

Josh Bode
  • Josh Bode

    Josh Bode - 2010-06-23


    I have just started to use xlloop - I'm hoping to integrate some processes in R to Excel - some charting and time series analysis. I need to generate some charts frequently, and I'm hoping to output them directly to PDF using R, but not ready to wean myself entirely off Excel yet as I still use it for quick, ad-hoc analysis.

    I've had some really good results so far with xlloop, and it looks very promising!

    A couple of things I've noticed that may be of use to other people. In the xlloop.R server file:

    • In the function XLLoopHandlerInvoker, I think the assignment to argv_ should be to argv[] (double brackets) instead, otherwise R unhelpfully unpacks the lists to argv (so many ways to index an array/list in R)
    • _In the function decodeMulti I've found it useful to wrap the lapply with matrix, i.e. _

      matrix(lapply(1:len, function(x) decodeXloper(con)), ncol=cols, byrow=TRUE)

    _. This way, R functions being called are provided with a matrix, rather than an rolled-up list.

    Hope this helps someone.


  • Josh Bode

    Josh Bode - 2010-06-23

    Gah, sorry - BBcode formatting is clearly beyond me. Preview would be good, SF ;)

    The first point should read:

    assignment to argv should be to argv[] (double brackets) instead

  • Peter Smith

    Peter Smith - 2010-06-26


    Thanks for the feedback. I haven't used the R server implementation extensively (it was contributed by another user), but I will incorporate your suggestions for the next release…


  • Josh Bode

    Josh Bode - 2010-06-26

    Hi Peter,

    I haven't mucked around with it much yet either… got completely distracted by the Python server instead :) Unfortunately the rest of my team prefers R over Python so that's what we do most of our analysis in, though we're never going to completely say goodbye to Excel.

    I'm really excited by the possibilities of xlloop, though, whatever language I choose. Our corporate network is rather locked down, limiting severely what we can have installed on out workstations, so being able to push the calculations off to another machine is one solution we're playing with.

    I'm working on an alternative Python function handler that I will share once it is more complete. Thank you for this very interesting project :)



Log in to post a comment.