각각에 대해 제한()저는 For Each() 함수에 대해 꽤 생소하므로 참아주세요. 아래 스크립트는 제가 필요로 하는 것을 수행하지만, 작동하는 열을 제한하고 싶습니다. 3열 이상에서만 작동하고 싶습니다. For() 함수로는 충분히 간단하지만 여기서는 어떻게 작동하는지 잘 모르겠습니다.
For Each({colnames, index}, dt << Get Column Names("String"),
rows_to_color = dt << Get Rows Where((Column(dt, colnames)[]<100));
Column(dt, colnames) << Color Cells("Red", rows_to_color);
);자동화 및 스크립팅Re: 각각에 대해 제한하기()목록을 살펴보기 전에 목록에서 값을 제거하세요.
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
collist = dt << Get Column Names("String");
Remove From(collist, 1, 3);
show(collist);
For Each({colnames, index}, collist,
rows_to_color = dt << Get Rows Where((Column(dt, colnames)[] < 100));
Column(dt, colnames) << Color Cells("Red", rows_to_color);
);Re: 각각에 대해 제한()목록을 정의할 때 for each 내부에서도 할 수 있지만, 제 생각에는 미리 하는 게 더 좋습니다(읽고 디버깅하기 쉽거든요)
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
For Each({colname, index}, Remove(dt << Get Column Names("String"), 1, 3),
show(colname);
);
또는 이전에 목록을 수집한 경우 특정 항목을 반복할 수 있습니다.
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
collist = dt << Get Column Names("String");
For Each({colname, index}, collist[4::N Items(collist)],
show(colname);
);Re: 각각에 대해 제한하기()좋아요! 잘 작동합니다.