根据《心律失常》文档中“权重”栏的数据以及附件中的“标准”文件,得出“级别”栏。
然后,根据“level”列和“class”列,将“V3 QRSTA”列的数据按照以下规则进行分类:
行依据为“级别”,列依据为“类别”,对“V3 QRSTA”列的正值和负值分别进行分类汇总。
以上操作可以用excel及其函数轻松完成,但数据量大时速度较慢。
如果数据量很大,如何使用JMP JSL应该可以更快完成。非常感谢!
这个问题相当复杂。 我制作了几张照片并上传了 2 个文件。
这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。
22 条回复22
这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。
以下是进行处理以设置每个原始数据行的等级的一种方法的示例。我将其设置为具有 50,000 个示例数据表,在我使用 4 年的 Window 电脑上大约需要 2 秒来创建示例数据,然后设置每行的等级。
Names Default To Here( 1 );
// Create a sample standards table
dtStandard = New Table( "Standards",
Add Rows( 200 ),
New Column( "standards", formula( Random Integer( 93500, 1000000 ) ) )
);
dtStandard << run formulas;
dtStandard:standards << delete property( "formula" );
dtStandard << sort( by( :standards ), order( ascending ), replace table( 1 ) );
dtStandard << rerun formulas;
dtStandard << New Column( "grades", formula( Row() ) );
dtStandard:grades << delete property( "formula" );
// Create an example table
dt = New Table( "Example",
Add Rows( 50000 ),
New Column( "Raw Data", formula( Random Integer( 93500, 1000000 ) ) )
);
dt << run formulas;
dt:Raw Data << delete property( "formula" );
// Make sure the standards table has the same range as the example table
If( dtStandard:standards[1] > Col Min( dt:raw data ),
dtStandard:standards[1] = Col Min( dt:raw data )
);
If( dtStandard:standards[200] < Col Max( dt:raw data ),
dtStandard:standards[200] = Col Max( dt:raw data )
);
// Set the standard
// The code below is the actual code that performs the setting of the grade
// Create a column to hold the original row positions in the data table
dt << New Column( "OrigRow", formula( Row() ) );
dt:OrigRow << delete property( "formula" );
// Add the new grades column to the Example data
dt << New Column( "grade" );
// Sort the data in order of the raw data
dt << sort( by( :Raw Data ), order( ascending ), replace table( 1 ) );
For( i = 1, i <= N Rows( dt ), i++,
If( i == 1,
lkupRow = Max( dtStandard << get rows where( dtStandard:standards <= dt:Raw Data[i] ) )
);
While( dtStandard:standards[lkupRow] < dt:Raw Data[i], lkupRow = lkupRow + 1 );
dt:grade[i] = dtStandard:grades[lkupRow];
);
// Sort the data back to the original order
dt << sort( by( :OrigRow ), order( ascending ), replace table( 1 ) );
// Delete the origrow column
dt << delete columns( "OrigRow" );
这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。
这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。
已创建:
Jul 22, 2019 03:37 AM
| 上次修改时间: Jul 22, 2019 12:41 AM
(3619 浏览量)
| Posted in reply to message from lwx228 07-21-2019
现在我想通过添加权重“level”列和“class”列来分别总结“V3 QRSTA”列的正值和负值。
如何使用 JSL 做到这一点?
计算相关的数据我已经上传到附件中了,谢谢!
这篇帖子最初是用 English (US) 书写的,已做计算机翻译处理。当您回复时,文字也会被翻译成 English (US)。