열 일치 대화 상자 스크립팅 방법사용자가 열 쌍을 일치시켜야 하는 대화 상자가 있습니다. 조인 테이블에서 하는 것과 거의 비슷합니다.

특정 예 - 실험적으로 측정된 매개변수 세트와 이론적 예측 세트가 있습니다. 이 데이터는 서로 다른 소스에서 가져오고 열 이름은 임의로 지정할 수 있으므로 사용자가 각 매개변수에 대해 이론과 실험을 일치시켜야 합니다.
이 부분을 스크립팅하는 방법에 대한 예가 있습니까? 이 쌍을 유지하는 방법과 나중에 사용하는 방법은 무엇입니까?
지금까지 나는 이것을 가지고 있으며 일치하는 쌍(위의 예와 같이)을 반영하기 위해 녹색 프레임의 상자를 스크립팅하는 방법과 해당 쌍을 유지하는 방법(2개의 항목 목록?) 및 제거/회수 방법에 관심이 있습니다. 그들 등:

스크립트는 다음과 같습니다.
dt = New Table( "Untitled 5",
Add Rows( 4 ),
Set Header Height( 46 ),
New Column( "X", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 4] ) ),
New Column( "A_Theory", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 3, 2, 3] ) ),
New Column( "B_Measured", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [4, 5, 6, 5] ) ),
New Column( "A_Measured", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 4, 3, 4] ) ),
New Column( "B_Theory", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [4, 5, 3, 4] ) )
);
notImplemented = Expr(
win = New Window( "Feature Not Implemented Yet", <<MODAL></MODAL>
데이터 혼합 및 정리Re: 열 일치 대화 상자를 스크립팅하는 방법응용 프로그램이 작동하는 방식에 따라 사용자가 실행/확인 버튼을 누를 때까지 목록에 값을 추가하지 않는 것이 좋습니다. 사용자가 목록 상자에서 값을 제거하려고 할 수 있기 때문입니다(현재 불가능).
이 예제에 Run 버튼과 runExpr을 추가했습니다(JMP16이 없는 경우 Transform Each를 목록에 값을 추가하는 For 루프로 수정할 수 있음).
Names Default To Here(1);
matchedList = {};
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
clb1 << Clear selection;
clb2 << Clear selection;
lb << Append(a || "=" || b);
);
notImplemented2 = Expr(
lb << Remove Selected;
);
runExpr = Expr(
lb << get items;
lb_values = Transform Each({val}, lb << get items, Words(val, "="));
show(lb_values);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Lineup box(N Col(1),
Button Box("Match", notImplemented),
Button Box("Remove", notImplemented2),
),
lb = List Box({}, Nlines(12))
)
),
Panel Box("Actions",
Button Box("Run",
runExpr;
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);
Re: 열 일치 대화 상자를 스크립팅하는 방법좋습니다. 다음과 같이 작동합니다.
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
lb << Append(a || "=" || b);
matchedList[N Items( matchedList ) + 1] = Eval List ({a, b});
//Insert Into(matchedList, Eval List(columnPair));
Show(matchedList);
);Re: 열 일치 대화 상자를 스크립팅하는 방법질문이 하나 더 있습니다. 다음과 같이 스크립트를 수정했습니다.
Names Default To Here(1);
matchedList = {};
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = (clb1 << get selected)[1];
b = (clb2 << get selected)[1];
lb << Append(a || "=" || b);
Insert Into(matchedList, {a, b});
Show(matchedList);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Button Box("Match", notImplemented),
lb = List Box({}, Nlines(12))
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);그리고 나는 이것을 얻고 있습니다 :
matchedList = {a, b, a, b};내가 이것을 기대하는 동안 :
matchedList = {{"A_Theory", "A_Measured"}, {"B_Theory", "B_Measured"}}또는 쌍을 통해 반복할 수 있도록 해당 라인을 따라 있는 것입니다.
내가 도대체 뭘 잘못하고있는 겁니까?
Re: 열 일치 대화 상자를 스크립팅하는 방법한번 해보겠습니다.
그런 다음 나중에 이러한 열에 대해 작업을 수행하려면(예: 각 쌍에 대해 Fit Y를 X로 플로팅) 목록 목록으로 유지해도 됩니까?
columnPairs = {{A_Theory, A_Experiment}, {B_Theory, B_Experiment}};그런 다음 반복하거나 더 나은 옵션이 있습니까?
Re: 열 일치 대화 상자를 스크립팅하는 방법추측해야 한다면 조인 플랫폼은 열 쌍을 추가할 때 새 값을 추가하는 목록 상자를 사용합니다.
Names Default To Here(1);
dt = New Table("Untitled 5",
Add Rows(4),
Set Header Height(46),
New Column("X", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4])),
New Column("A_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([1, 3, 2, 3])),
New Column("B_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 6, 5])),
New Column("A_Measured", Numeric, "Continuous", Format("Best", 12), Set Values([1, 4, 3, 4])),
New Column("B_Theory", Numeric, "Continuous", Format("Best", 12), Set Values([4, 5, 3, 4]))
);
notImplemented = Expr(
a = clb1 << get selected;
b = clb2 << get selected;
lb << Append(a[1] || "=" || b[1]);
);
gui = Expr(
H List Box(
V List Box(
Panel Box("Theory",
clb1 = Col List Box(All, Nlines(5))
),
Panel Box("Experiment",
clb2 = Col List Box(All, Nlines(5))
)
),
Panel Box("Theory vs Experiment Matching",
H List Box(
Button Box("Match", notImplemented),
lb = List Box({}, Nlines(12))
)
)
)
);
fileLoad = New Window("Example", Show Menu(0), Show Toolbars(0), gui);
//{col1, col2} = Words((lb << get items)[1], "=");

나는 스크립트를 빠르게 함께 던졌기 때문에 변수에 대해 했던 것보다 더 나은 이름 지정을 사용하고 열 목록 상자에서 여러 값을 선택하는 것을 방지하고 열 인덱싱의 하드 코딩된 제한을 제거했습니다. 값이 필요할 때 << get items to the list box reference로 항목 목록을 얻을 수 있습니다. 그런 다음 Words()를 사용하여 다른 부분으로 더 분할합니다.