범위를 벗어난 오류가 발생하는 각 열의 각 행에 대한 대체()전체 데이터 테이블에서 문자열을 검색하고 바꿔야 합니다. 나는 뭔가 우아한 것을 기대하면서 이 솔루션을 참조했지만 10행 테이블의 11행에 대해 불평하고 있습니다.
JMP Pro 16.1에서 실행되는 코드
allCols = file << get column names(string);
file << group columns("col group", myCols);
myCols = file << get column group("col group");
for(cols = 1, cols <= n items(myCols), cols++,
file << begin data update;
for each row(file,
file:myCols[cols] = substitute(file:myCols[cols],
"X", "0"
)
);
file << end data update;
);오류:
Cannot set value for the column 'dot' because the row number (11) is not valid.
at row 1 in access or evaluation of 'Assign' , file:myCols[cols] = /*###*/Substitute( file:myCols[cols], "X", "0" ) /*###*/
샘플 열을 추가하는 것을 잊었습니다.
64.0
47.0
2.0
106.0
174.0
12.0
X
2.0
X
14.0
고급 통계 모델링소비자 및 시장 조사데이터 접근대량 맞춤화품질 및 프로세스 엔지니어링Re: 범위를 벗어난 오류가 발생하는 각 열의 각 행에 대한 대체()아래 코드를 약간 수정하면 제대로 작동하는 것 같습니다.
Names Default To Here( 1 );
file = Current Data Table();
allCols = file << get column names( string );
file << group columns( "col group", allCols );
myCols = file << get column group( "col group" );
For( cols = 1, cols <= N Items( myCols ), cols++,
file << begin data update;
For Each Row(
file,
As Column( file, myCols[cols] ) = Substitute( As Column( file, myCols[cols] ),
"X", "0"
)
);
file << end data update;
);