GithubHelp home page GithubHelp logo

Comments (3)

ramnathv avatar ramnathv commented on June 5, 2024 1

@oli666 unfortunately, that is the behavior currently possible. The only way to refresh the R tool in the macro is to close the macro and reopen it. Now, there are some approaches to work around this, and I am listing them in no particular order:

  1. Instead of running insertRcode multiple times, you can directly source the R code in the R tool. So if your macro is named foo.yxmc and the R code is in foo1.R, you can do source("path/to/foo.R"). I would recommend absolute paths since, that way it will work no matter where it is called. The idea is to then run insertCode, once you are happy with the macro and now want to include it in the R tool to make the macro portable.
  2. Another approach is to create a workflow that uses the macro. Under this approach, you will keep the workflow open to test the result of your changes. The workflow will dynamically pick up the macro and so as long as you don't have it open, it will use the latest R code.

Over time, I have begun to use insertRcode less and less, as I use my R file to develop the computational logic of the macro and run insertRcode only when I want to make sure that it works well in Alteryx.

Hope this helps. I would be happy to chat more with you on this, as I am actively seeking feedback on ways to make this even better.

from alteryxrhelper.

oli666 avatar oli666 commented on June 5, 2024

Hi Ramnath,
the second approach mentioned adds a lot of convenience! I will stick to it.
I will keep you posted how this approach will work during my day to day business during the next weeks.
Many thanks for the hint!
Regards
Oli

from alteryxrhelper.

ramnathv avatar ramnathv commented on June 5, 2024

@oli666 you are welcome. Suggestions and comments are welcome as I improve this package :)

from alteryxrhelper.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.