Apply a formula to all cells

Hi everyone, I'm a new user of Knime and I want to apply a simple formula to all the cells of a big table. I know that with the Java Snippet node I can set that for a column (and so for all the rows of that colum) but ther's a way to do that for all the columns?

Thanks

My answer might not be the best, but it does what you would like to do. Only think to remember is that formula is applied to all cells, hence column values must support operation of that formula and most certainly must be of the same type (because Java Snippet Simple returns only one type).

Try to use these nodes:

  • Column Aggregator (in Options select List)
  • Then perform Java Snippet action on an array:
    • Integer[] arr = new Integer[$List$.length];
      for(int i=0; i<arr.length; i++) {
         arr[i] = $List$[i] * 2;
      }
      return arr;
      
  •  Split Collection Column

Regards,

Primož