"Macro Madness"

ndoromalndoromal MemberPosts:5Contributor I
edited June 2019 inHelp

Hi All-

I'm new to the RM community and this is my first forum post (so please go easy:)

I'm trying to do basic arithmetic with a macro; I want to assign a value to a macro and then decrement it by one. (The sad thing is that there is probably a better way to achieve the same end for the process, but I've invested so much time, at this point, I want to figure out how to do this.)

I've tried a number of approaches:

using eval(%{MACRO_NAME}) syntax
使用# {MACRO_NAME}语法

eval(%{MACRO_NAME}) - 1

eval(%{MACRO_NAME} -1)

using one macro (setting MACRO_NAME value and then setting MACRO_NAME to MACRO_NAME - 1

using two macros (setting MACRO_NAME value and then setting MACRO2 to MACRO_NAME - 1

using the Generate Macro operator

using the Set Macro operator

I'm having trouble attaching the process, so apologies for not posting it.

Thank you in advance for the help!

-Noel

--

macro.jpg

Best Answer

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn
    Solution Accepted

    Hi@ndoromal,

    First, I have a good new and a bad new :

    Good new : you have correctly applied the rules of the community : You shared your process and the same can not be said of everyone, so congratulations.:catvery-happy:

    Bad new : Your process is broken : I can not be loaded in RapidMiner....:catsad:

    Now the serious things :

    I don't know what is your final goal (a time-series study...?), but here a sample process which performs what you want to do :

    Generate_Macro.png

    the process :





    <宏/ >
























    I hope it helps,

    Regards,

    Lionel

    sgenzer

Answers

  • ndoromalndoromal MemberPosts:5Contributor I

    I've attached my process





    <宏/ >








    (after rereading the instructions:)

  • ndoromalndoromal MemberPosts:5Contributor I

    Hi Lionel-

    Thank you so much! I was working on this late last night... I probably should have hit pause and resumed this morning. Your help is greatly appreciated!

    sgenzer
  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn

    Hi,

    You're welcome@ndoromal

    Now you can sleep on both ears.:catwink:

    Regards,

    Lionel

    sgenzer
Sign InorRegisterto comment.