我浏览了论坛,没有看到这个帖子。我想将数据表中大于特定值的所有值添加为缺失值代码。我想到的方法是迭代地将所有这些值定义在一个列表中,然后像下面这样将该列表添加到迭代中。
Column( dt, colNames[i] ) << set property ("Missing Value Codes", {999, -999, 1e+13, 1.5e13, 2e+13, 3e+13, 4e+13, 5e+13, 6e+13, 1e+30, 2e+30, 3e+30, -5.5e+29, 9e+33});
有人能解决这个问题吗?如果没有,我会想办法并发布出来。
在我们得到这个之前,你必须使用类似你描述的东西
允许在缺失值代码中使用限制或提供具有相同功能的新列属性
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
limit = 55;
m = dt[0, "height"];
high_rows = Loc(m > 55);
Column(dt, "height") << Set Property("Missing Value Codes", As List(m[high_rows]));
Write();Added an iterative loop and colouring for the eliminated cells off to the races.
Names Default To Here(1);
dt = Current Data Table();
colnames = dt << get column names( numeric,string );
meanlist = {};
For( i = 1, i <= N Items( colnames ), i++,
m = dt[0, colnames[i]];
high_rows = Loc(m > 1000000);
column(dt,colnames[i]) << Set Property("Missing Value Codes", As List(m[high_rows]));
column(dt,colnames[i]) << Color Cells("Red", high_rows);
Write();
);