Hello,
I have a project and my purpose is to extract from my data table (1) the average, maximum and minimum value for each column, and write the results into a new table (2).
I found this part of the code and it seems to work for few columns, but not for all. I have like 300 columns and I have the results for only twenty of them.
For( i = 1, i <= N Col( dt ), i++,
If (:Trial[i] =="TrialName",
If( Column( dt, i ) << get data type == "Numeric",
Write( "\!n", Column( dt, i ) << get name );
Write( Column( dt, i ), "\!nMin: ", Col Min( Column( dt, i ) ) );
Write( "\!nMax: ", Col Max( Column( dt, i ) ) );
Write( "\!nAverage: ", Col Moving Average( Column( dt, i) ) );
Write ("\!n");
)
)
); I can see the results in the logs but I don't manage to write the results in the right column of my new table (2).
View more...This code shows something like :
Column 1
Min : 10
Max : 50
Average : 30
Here is an example of what I want :
Table 1: Column 1 : Column 2 : --> Table 2 -----> Column 1 : Column 2 :
10 45.2 Max : 50 Max : 52.4
20 48.3 Min : 10 Min : 18.3
30 36.7 Average : 30 Average : 40.18
40 52.4
50 18.3
--->
1. I think all my data are not considered as numbers so JMP doesn't want to calculate min, max and average, but I didn't find a way to "force" the type of the data.
2. I don't manage to write my results in the columns of the final table (2).
I don't ask for the full answer but only for tips because I'm really stuck.
Thank you !