Defining text variable with regex

Welcome to our Forums Technical Support Support Desk Defining text variable with regex

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4775
    kourosh kalayeh
    Participant

      Hi,

      I was wondering if there is anyway that I can define text variable with regex (wildcard *, specifically).  Some of my graphs have different components, for example, histogram and some statistics using box command.  I use my flattened data along with masks to plot the appropriate portion of data.  Right now, I have two Drawing groups (one for my histograms, and one for my statistics and Box command) and I have masked each of these groups individually.  It would be very convenient (and less prone to mistake) if I can masked them both with one global variable.  The reason that I cannot put everything into one Drawing group is that the column that is being used for masking is different between the two groups.

      #4776
      dgteam
      Moderator

        In terms of the variables, there is not currently a way to include a wildcard.  Although, wildcards can be used in a mask defined using a command.  One thing that might help is that you can use the commands, such as the Points command  to generate a column based on more complex expressions.

        Here is an example to illustrate.

        1 – Add a Points command with the x as the row number and leave the y as specified.

        2 – Add Mask conditions using wildcards as needed.  In my example, I wanted all rows returned where it the text begins with ‘A’ or ends in ‘1’.

        3 – Click the gear menu on the Points command and select Extract as Column >Mask.

        This creates a number column of 1 and 0, where 1 means the value satisfied the conditions (outlined here in red).

        Mask_Example

        You don’t even have to draw the result of the command but just use this as a way to create more complicated mask statements.  Then the extracted column, containing 1 or 0, is used in other commands where you want to draw the data or perform other calculations.

        Again I am not sure if this is getting at your question but this is a way to create a more complicated mask and have it represented in a single column.

         

        #4777
        kourosh kalayeh
        Participant

          Hi,

          Thank you for your answer.  While it is not what I am looking for, it is a nice trick and might come handy.  Thanks for sharing it.

          Regarding the original question, I am currently using wildcards in mask defined in both commands (histogram and box) but I am looking for away to use it once (for a group containing the two).  The reason that I cannot do it right now is the masks are being applied on two different columns (although the text is the same).

          Please see the attached screenshots for clarification.

          Best,
          Kourosh

          Screen Shot 2020-09-08 at 9.25.19 PM copy

           

          Screen Shot 2020-09-08 at 9.25.27 PM

          #4789
          dgteam
          Moderator

            Thanks for clarifying.

            There is not a way to currently combine a wildcard with a variable.  This is something we will work on for the next version!

            #4791
            kourosh kalayeh
            Participant

              Great, thanks for your hard work.

              Kourosh

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.

            Welcome to our Forums Technical Support Support Desk Defining text variable with regex