안녕하세요,
저는 다양한 열 (숫자 및 문자 모두)에 많은 데이터를 요약 한 스크립트의 끝 부분에 있습니다.
특정 기준을 충족하는 숫자 셀의 서식을 반복하는 것은 쉽지만 특정 하위 문자열을 포함하는 문자 열에 색상을 할당하는 데 문제가 있습니다.
예를 들어, 셀 (다음 내용 포함 : 1,1,2,1,1,2,3,3)은 문자 '3'이 한 번 발생하므로 빨간색으로 표시되어야합니다.
셀의 전체 내용을 지정하면 문제는 없지만 '3'을 찾아서 그에 따라 색상을 지정하려고합니다.-> 실패합니다.
아래 스크립트를 추가했습니다.
모든 제안을 주시면 감사하겠습니다.
베스트,
세바스티앙
Names Default To Here( 1 );
clear log();
dt = New Table( "test",
Add Rows( 8 ),
New Column( "unique_group_id",
Character,
"Nominal",
Set Values(
{"ELN-19-0588-A", "ELN-19-0588-B", "ELN-19-0588-C", "ELN-19-0588-D",
"ELN-19-0588-E", "ELN-19-0588-F", "ELN-19-0588-G", "ELN-19-0588-H"}
),
Set Display Width( 115 )
),
New Column( "FOB max",
Character,
"Nominal",
Set Selected,
Set Values(
{"0,0,0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0",
"0,0,3,0,0,1,0,2", "1,1,2,1,1,2,3,3", "0,0,0,0,0,0,0,0",
"4,2,2,3,2,3,3,4", "1,0,0,1,1,1,1,1"}
)
),
New Column( "glib1 % PBS - potatoe",
Numeric,
"Ordinal",
Format( "Best", 12 ),
Set Selected,
Set Values( [100, 113.39, 108.3, 156.38, 822.21, 768.51, 487.2, 222.56] )
),
New Column( "calb (IHC) cere",
Character,
"Nominal",
Set Values(
{"0,0,0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0",
"0,0,0,0,0,0,0,0", "3,4,3,4,3,3,3,4", "3,3,3,5,2,3,3,3",
"0,0,0,0,0,0,0,0", "0,0,0,0,0,0,1,0"}
)
)
);
wait(2);
col=dt <<GET column="" names="">200,
column(col[i]) << color cells( "Light Red", Row())
)
)));
//Does not work - it needs to be an exact match
c="FOB";
b={"3"};//trying to look for cells in columns labelled with FOB whihc contains the character '3'
For(i=1,i<=nc,i++, if( Contains( col[i], c ),
for each row(
If( contains(b,as column(col[i])),
column(col[i])<< color cells( "Light Red", Row())
)
)));
wait (2);
//Works when specifying exactly the content of the cell(s) to match
c="FOB";
b={"1,1,2,1,1,2,3,3"};
For(i=1,i<=nc,i++, if( Contains( col[i], c ),
for each row(
If( contains(b,as column(col[i])),
column(col[i])<< color cells( "Red", Row())
)
)));
</GET>Contains () 함수를 거꾸로 지정하고 JMP 목록을 비교했습니다.그것들을 고치면 잘 작동합니다.

Names Default To Here( 1 );
clear log();
dt = New Table( "test",
Add Rows( 8 ),
New Column( "unique_group_id",
Character,
"Nominal",
Set Values(
{"ELN-19-0588-A", "ELN-19-0588-B", "ELN-19-0588-C", "ELN-19-0588-D",
"ELN-19-0588-E", "ELN-19-0588-F", "ELN-19-0588-G", "ELN-19-0588-H"}
),
Set Display Width( 115 )
),
New Column( "FOB max",
Character,
"Nominal",
Set Selected,
Set Values(
{"0,0,0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0",
"0,0,3,0,0,1,0,2", "1,1,2,1,1,2,3,3", "0,0,0,0,0,0,0,0",
"4,2,2,3,2,3,3,4", "1,0,0,1,1,1,1,1"}
)
),
New Column( "glib1 % PBS - potatoe",
Numeric,
"Ordinal",
Format( "Best", 12 ),
Set Selected,
Set Values( [100, 113.39, 108.3, 156.38, 822.21, 768.51, 487.2, 222.56] )
),
New Column( "calb (IHC) cere",
Character,
"Nominal",
Set Values(
{"0,0,0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0", "0,0,0,0,0,0,0,0",
"0,0,0,0,0,0,0,0", "3,4,3,4,3,3,3,4", "3,3,3,5,2,3,3,3",
"0,0,0,0,0,0,0,0", "0,0,0,0,0,0,1,0"}
)
)
);
wait(2);
col=dt <<GET column="" names="">200,
column(col[i]) << color cells( "Light Red", Row())
)
)));
//Does not work - it needs to be an exact match
c = "FOB";
b = "3";//trying to look for cells in columns labelled with FOB whihc contains the character '3'
For( i = 1, i <= nc, i++,
If( Contains( col[i], c ),
For Each Row(
If( Contains( As Column( col[i] ), b ),
Column( col[i] ) << color cells( "Light Red", Row() )
);
)
)
);
wait (2);
//Works when specifying exactly the content of the cell(s) to match
c = "FOB";
b = "1,1,2,1,1,2,3,3";
For( i = 1, i <= nc, i++,
If( Contains( col[i], c ),
For Each Row(
If( Contains( As Column( col[i] ), b ),
Column( col[i] ) << color cells( "Red", Row() )
)
)
)
);</GET>