수식에 열 이름 목록 삽입안녕하세요,
저는 약 14 개의 저널을 만드는 스크립트를 만들고 있습니다. 필자는 준비 할 데이터의 10 가지 세트를 가지고 있으며 각 저널마다 각각 다른 테이블의 특정 데이터를 업데이트하고 특정 데이터를 차트로 만들고 싶습니다. 스크립트의 차트 설정은 내가 제공 한 샘플 스크립트보다 복잡합니다. 내 스크립트의 열 이름에 변수를 사용하는 방법을 알아내는 데 도움이됩니다. 나는 Parse, eval 및 expr의 조합을 시도해보고 작동시키지 못했습니다.
이런 식으로하고 싶습니다 :
table1 = open("$SAMPLE_DATA/students1.jmp");
table2 = open("$SAMPLE_DATA/students2.jmp");
ins = ":height, :weight";
table1 << Update(With( table2 ),
Match Columns( :name = :name ),
Add Columns from Update table( parse(ins) ));
Current Data Table(table1);
Scatterplot Matrix(
Y( parse(ins) ),
X( :sex ),
Matrix Format( "Lower Triangular" ),
Ellipse Color( 3 ),
Fit Line( 0 )
);결과는 다음과 같습니다.
table1 = open("$SAMPLE_DATA/students1.jmp");
table2 = open("$SAMPLE_DATA/students2.jmp");
table1 << Update(With( table2 ),
Match Columns( :name = :name ),
Add Columns from Update table( :height, :weight ));
Current Data Table(table1);
Scatterplot Matrix(
Y( :height, :weight ),
X( :sex ),
Matrix Format( "Lower Triangular" ),
Ellipse Color( 3 ),
Fit Line( 0 )
);다시 : 수식에 열 이름 목록 삽입문제를 해결할 수있는 오래된 학교 방식이 있습니다.
names default to here(1);
table1 = open("$SAMPLE_DATA/students1.jmp");
table2 = open("$SAMPLE_DATA/students2.jmp");
ins = ":height, :weight;";
eval(parse(
"table1 << Update(With( table2 ),
Match Columns( :name = :name ),
Add Columns from Update table( "||ins||" ));"));
Current Data Table(table1);
Scatterplot Matrix(
Y( parse(ins) ),
X( :sex ),
Matrix Format( "Lower Triangular" ),
Ellipse Color( 3 ),
Fit Line( 0 )
);다시 : 수식에 열 이름 목록 삽입안녕 짐,
같은 방법으로 산점도를 작성하려면 어떻게해야합니까? scatterplot 매개 변수 중 하나에 따옴표가 있습니다. 감사!
다시 : 수식에 열 이름 목록 삽입\! 따라서 JMP의 이스케이프 시퀀스이므로 아래 스크립트에서 볼 수 있듯이 큰 따옴표를 따옴표 붙은 문자열에 삽입하는 데 \! "를 사용합니다
theExpr = (
"Bivariate( Y( :height ), X( :weight ),
Where( :sex == \!"F\!" ) );"
);
eval(Parse(theExpr));
이 모든 내용은 스크립팅 가이드에서 다룹니다. 나는 당신이 그것을 읽는 시간을 갖기를 강력히 추천한다.
도움말 ==> 서적 ==> 스크립팅 가이드
다시 : 수식에 열 이름 목록 삽입고맙습니다