Quantcast
Channel: KNIME RSS
Viewing all articles
Browse latest Browse all 4157

How to sum all the elements of a matrix

$
0
0

Hi guys I am trying to add all the elements of a matrix in one step 

The matrix is as follows:

ROWIDXYZ
A513
B333
C124
D331
R410

I wonder if I can use some scripting nodes because the number of colums may vary and I think is better to treat the matrix as a dataframe.

I used the node R Snippet but I got an error:

knime.in<-sum(knime.in)
knime.out <- knime.in

ERROR R Snippet            0:152      Execute failed: CODING PROBLEM    importBufferedDataTable(): Supporting only 'data.frame', 'matrix' and 'list' for type of "knime.out" (was 'numeric').

Thank you

 


Viewing all articles
Browse latest Browse all 4157

Trending Articles