연관 배열에서 연관된 열을 자동으로 플로팅합니다.Jarmo의 많은 도움으로 연결된 열의 연관 배열(aa)을 얻었습니다. 다음으로, 이것들을 플로팅해야 하는데, 쉽게 할 수 있나요?
Names Default To Here(1);
startchar1 = "VT";
startchar2 = "ID";
rgx_startchar1 = Eval Insert("^startchar1^(.+?)$");
dt = Current Data Table();
collist = dt << get column names(string);
VT_IDcols = {};
For( i = 1, i <= N Items( collist ), i++,
If( !Contains( collist[i], "Pass/Fail"), If( Contains( collist[i], "VT") | Contains( collist[i], "ID") , Insert Into( VT_IDcols, collist[i] ))));
aa = Associative Array();
For Each({colname}, VT_IDcols,
col_ptrn = Regex(colname, rgx_startchar1, "\1");
If(!IsMissing(col_ptrn), // starts with VT and ends with H
If(Contains(VT_IDcols, startchar2 || col_ptrn ),
aa[startchar1 || col_ptrn] = startchar2 || col_ptrn;
);
);
);자동화 및 스크립팅Re: 연관 배열에서 연관된 열을 자동으로 플롯어떻게 계획을 세우고 싶으신가요?
Names Default To Here(1);
endchar1 = "1";
endchar2 = "2";
rgx_endchar1 = Eval Insert("(.+?)^endchar1^$");
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
collist = dt << get column names(string);
aa = Associative Array();
For Each({colname}, collist,
col_ptrn = Regex(colname, rgx_endchar1, "\1");
If(!Is Missing(col_ptrn), // ends with H
If(Contains(collist, col_ptrn || endchar2),
aa[col_ptrn || endchar1] = col_ptrn || endchar2
)
);
);
// Plotting
lub = Lineup Box(N Col(2));
For Each({{xcol, ycol}}, aa,
lub << Append(dt << Bivariate(Y(Eval(xcol)), X(Eval(ycol))));
);
nw = new window("",
lub
);Re: 연관 배열에서 연관된 열을 자동으로 플롯자르모
잘 작동했습니다! 입력 선택을 허용하도록 약간 조정했습니다.
감사해요
Names Default To Here(1);
dt = Current Data Table();
dt << Clear Column Selection();
colList = dt << get column names( string );
check_list = {"VT", "ID", "DI", "IK", "GM"};
check_list2 = {"0", "1", "2", "3", "8"};
New Window( "Select Variables",
<<TYPE></TYPE>