更新行我有一个看起来像图片的jmp表。具有细节的每一行是患者的基线特征,以下行是在不同时间收集的数据。由于在软件中输入数据的方式,每个患者分成几行。然而,我想要具有基线特征,例如,所有各自行中的患者年龄(例如,1周,1个月等)。有没有办法做到这一点?我曾考虑为每位患者制作一排,但由于柱数较多,这将是一个非常麻烦的过程。
非常感谢您的帮助!提前致谢。
Re:更新行这个小脚本应该做你想要的
Names Default To Here( 1 );
dt = Current Data Table();
For( i = 1, i <= N Rows( dt ), i++,
If( i == 1,
hstudy_id = "";
hdob = .;
hsex = .;
hdate_of_x = .;
hyearx = .;
hage = .;
);
If( :ame[i] == "baseline_arm_1",
hstudy_id = study_id[i];
hdob = dob[i];
hsex = sex[i];
hdate_of_x = date_of_x[i];
hyearx = yearx[i];
hage = age[i];
,
study_id[i] = hstudy_id;
dob[i] = hdob;
sex[i] = hsex;
date_of_x[i] = hdate_of_x;
yearx[i] = hyearx;
age[i] = hage;
);
);