I created dummy variables for 583 codes, however there is a possibility that each row could have “1” for more than one column/code. The code is the column header. If this were excel, I would just use COUNTIF function (ok, this isn’t perfect cause I’m looking for an exact match). But an example of the cell I want to search is the following:
Now, if the column header matches any one of these codes that are all contained within one cell within one specific column, I want the cell with that specific header column to be 1, otherwise 0.
Any advice on this would be GREATLY appreciated. Thanks!
Thank you so much gonhaddock. As I look over your response and the configuration page of the regex node am I correct in that this code will need to be entered for every column? Is there are a way to create a loop to avoid having to re-enter code for each column? For clarification, there is one column with anywhere from 1 to 87 codes with the header “Code List”. Then I have 583 columns with a code such as the example above,“MA-36” as a header so the goal is to have either a 1 or 0 entered in the MA-36 column dependent upon whether MA-36 is included under the “Code List” column of that same row. Thanks again for helping me out with this. If there is a KNIME online course that you think will help please let me know.
node to get pares
Header_code1, Value1
Header_code1, Value2
…
Header_code2, Value1
Header_code2, Value2
so on
Using rule engine like suggested by @gonhaddock, you will get
Header_code1, 1
Header_code1, 1
…
Header_code2, 0
Header_code2, 1
Add RowiID
Use
node with “first” grouping function to get original structure with headers.
Hello @rinaldiinjapan
As your question was in the abstract about a cell case, my answer was pointing to the concept…
Now, in a workflow @izaychik63 is giving you another interesting concept to apply, long format pivoting all the columns and working with just 2 columns $ColumnNames$ and $ColumnValues$; this type of solution will avoid messing up with variables. Said that, the other approach -as you pointed- is the Loop End (Column Append) with variables.
About the training… you have the Level 1 Certification I think it is for free; and It is up to date.
There was another good start called KNIME Beginner’s Luck book , it is some years old, I can see the PDF online. You may get a promotion code contacting the team.