동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.안녕,
300개의 열이 있는 JMP 테이블 "시트 1"이 있습니다. 열 이름에 "Ahu1"이라는 문자열이 있는 모든 동일한 열에 대한 하위 집합을 만든 다음 열 추가, 업데이트 및 그래프 생성 및 최종적으로 폴더에 저장과 같은 하위 집합을 변경하려고 합니다. "Ahu1"의 대본을 쓸 수 있었습니다. 그러나 다른 모든 "Ahu's"에 대해서도 동일한 작업을 수행해야 합니다. Ahu2,Ahu3,Ahu4,Ahu5,Ahu6...Ahu52와 같은 문자열을 포함하는 다른 열 이름에 대해 이 프로세스를 반복하고 싶습니다. for 루프에서 이 작업을 수행하는 방법은 무엇입니까?
스크립트는 아래에 있습니다.
original_dt = Current Data Table();
Data Table( "Sheet1" ) << Subset(
Output Table( "Ahu1", link to original data table( 0 ) ),
All rows,
columns(
:Timestamp,
:donSteedOccupancy,
:Name( "Raeford, NC Temp" ),
:DonSteedES Ahu1 ClgVlvCmd,
:DonSteedES Ahu1 HtgVlvCmd,
:DonSteedES Ahu1 DaT,
:DonSteedES Ahu1 SaFanCmd,
:DonSteedES Ahu1 ZnT,
:DonSteedES Ahu1 ZnTStpt
)
);
Ahu1_dt = Data Table( "Ahu1" );
Ahu1_dt << New Column( "Occupancy",
character,
Nominal,
Formula( Munger( :donSteedOccupancy, Length( :donSteedOccupancy ) - 4, Length( :donSteedOccupancy ) ) )
);
Column( "Occupancy" ) << delete formula;
Ahu1_dt << delete columns( "donSteedOccupancy" );
Ahu1_dt << New Column( "SaFanCmd",
character,
Nominal,
Formula(
Munger(
:DonSteedES Ahu1 SaFanCmd,
Length( :DonSteedES Ahu1 SaFanCmd ) - 4,
Length( :DonSteedES Ahu1 SaFanCmd )
)
)
);
Column( "SaFanCmd" ) << delete formula;
Ahu1_dt << delete columns( "DonSteedES Ahu1 SaFanCmd" );
Ahu1_dt << Column( "Occupancy" );
For Each Row( :Occupancy = Match( :Occupancy, " 1min", " 1", " 0min", " 0", :Occupancy ) );
Column( "Occupancy" ) << Data type( character ) << Set Data Type( Numeric );
Ahu1_dt << Column( "SaFanCmd" );
For Each Row( :SaFanCmd = Match( :SaFanCmd, " 1min", " 1", " 0min", " 0", :SaFanCmd ) );
Column( "SaFanCmd" ) << Data type( character ) << Set Data Type( Numeric );
Ahu1_dt:DonSteedES Ahu1 ClgVlvCmd << Format( "percent" );
Ahu1_dt:DonSteedES Ahu1 HtgVlvCmd << Format( "percent" );
Column( "SaFanCmd" ) << Modeling type( continuous );
optstartgraph = Ahu1_dt << Graph Builder(
Size( 1377, 923 ),
Variables(
X( :Timestamp ),
Y( :DonSteedES Ahu1 ClgVlvCmd ),
Y( :DonSteedES Ahu1 HtgVlvCmd, Position( 1 ) ),
Y( :Name( "Raeford, NC Temp" ) ),
Y( :DonSteedES Ahu1 DaT, Position( 2 ) ),
Y( :DonSteedES Ahu1 ZnT, Position( 2 ) ),
Y( :DonSteedES Ahu1 ZnTStpt, Position( 2 ) ),
Y( :SaFanCmd, Position( 2 ), Side( "Right" ) ),
Color( :Occupancy )
),
Elements( Position( 1, 1 ), Line( X, Y( 1 ), Y( 2 ), Color( 0 ), Legend( 5 ) ), Heatmap( X, Legend( 8 ) ) ),
Elements(
Position( 1, 2 ),
Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Color( 0 ), Legend( 6 ) ),
Line( X, Y( 5 ), Color( 0 ), Legend( 7 ) ),
Heatmap( X, Legend( 9 ) )
),
SendToReport(
Dispatch( {"Line[DonSteedES Ahu1 ClgVlvCmd...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Heatmap[DonSteedES Ahu1 ClgVlvCmd...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Line[Raeford, NC Temp...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Line[SaFanCmd] (right)"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Heatmap[Raeford, NC Temp...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch(
{},
"Timestamp",
ScaleBox,
{Min( 3537633600 ), Max( 3538263600 ), Interval( "Hour" ), Inc( 1 ), Minor Ticks( 0 ),
Label Row( Label Orientation( "Angled" ) )}
),
Dispatch( {}, "DonSteedES Ahu1 ClgVlvCmd", ScaleBox, {Min( 0 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Transparency( 0.35 ), gradient(
{Color Theme(
{"mine", 16387, {{79, 16, 79}, {119, 0, 119}, {42, 63, 255}, {0, 170, 170}, {0, 227,
0}, {221, 221, 0}, {238, 119, 0}, {252, 11, 11}, {158, 33, 33}}, {0,
0.193732193732194, 0.2, 0.495726495726496, 0.501424501424502, 0.507122507122507,
0.943019943019943, 0.95, 0.954415954415954}}
)}
)}
)
), Legend Model(
9,
Properties(
0,
{Transparency( 0.35 ), gradient(
{Color Theme(
{"mine", 16387, {{79, 16, 79}, {119, 0, 119}, {42, 63, 255}, {0, 170, 170}, {0, 227,
0}, {221, 221, 0}, {238, 119, 0}, {252, 11, 11}, {158, 33, 33}}, {0,
0.193732193732194, 0.2, 0.495726495726496, 0.501424501424502, 0.507122507122507,
0.943019943019943, 0.95, 0.954415954415954}}
)}
)}
)
)}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {5, [0, 1], 8, [2], 6, [-3, -3, 4, 5], 7, [-3], 9, [3]} ),
Position( {0, 1, 2, -3, -3, 4, 5, -3, 3} )}
)
)
);
optstartgraph << Save Picture( "C:\Projects\Projects\Hoke\Year 1\Jmp\Year 0\DonSteed\Feb16\Ahu1.jpg", "JPG" );
optstartgraph << close window;
도와주세요.
감사.
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@txnelson 정말 고맙습니다 .
작동합니다!!
@uday_guntupalli 도움을 주셔서 감사합니다! 
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.다음은 Ahu 열 집합의 50개 전체에 걸쳐 반복되는 코드 버전입니다.루핑을 가능하게 하기 위해 수행된 작업에 대한 스크립트의 주석을 참조하십시오.
Names Default To Here( 1 );
original_dt = Data Table( "Sheet1" );
// Loop across all 50 Ahu column sets
// The number of column sets could be programatically determined
// if desired
For( i = 1, i <= 50, i++,
// Set the Ahu version to be used
targetAhu = "Ahu" || Char( i );
// Create the subsetted data table, naming it by the
// name of the current Ahu version
Ahu_dt = original_dt << Subset(
Output Table( targetAhu, link to original data table( 0 ) ),
All rows,
columns(
original_dt:Timestamp,
original_dt:donSteedOccupancy,
original_dt:Name( "Raeford, NC Temp" ),
Column( original_dt, "DonSteedES " || targetAhu || " ClgVlvCmd" ),
Column( original_dt, "DonSteedES " || targetAhu || " HtgVlvCmd" ),
Column( original_dt, "DonSteedES " || targetAhu || " DaT" ),
Column( original_dt, "DonSteedES " || targetAhu || " SaFanCmd" ),
Column( original_dt, "DonSteedES " || targetAhu || " ZnT" ),
Column( original_dt, "DonSteedES " || targetAhu || " ZnTStpt" )
)
);
// no need for this statement, since it is set when the data table is created
//Ahu_dt = Data Table( targetAhu );
// No changes needed here, except for pointing to the current Ahu data table
Ahu_dt << New Column( "Occupancy",
character,
Nominal,
Formula( Munger( :donSteedOccupancy, Length( :donSteedOccupancy ) - 4, Length( :donSteedOccupancy ) ) )
);
Column( Ahu_dt, "Occupancy" ) << delete formula;
Ahu_dt << delete columns( "donSteedOccupancy" );
// This section of code has required changes embedded within a formula
// JMP will not resolve the code properly and therefore, Substitution
// is required to force the generation of the exact code required for
// the formula
Eval(
Substitute(
Expr(
Ahu_dt << New Column( "SaFanCmd",
character,
Nominal,
Formula( Munger( __SaFanCmd__, Length( __SaFanCmd__ ) - 4, Length( __SaFanCmd__ ) ) )
)
),
Expr( __SaFanCmd__ ), Parse( ":DonSteedES " || targetAhu || " SaFanCmd" )
)
);
Column( Ahu_dt, "SaFanCmd" ) << delete formula;
// Minor changes, just making sure the current target data table is being
// pointed to
Ahu_dt << delete columns( "DonSteedES " || targetAhu || " SaFanCmd" );
Ahu_dt << Column( "Occupancy" );
For Each Row( ahu_dt:Occupancy = Match( Ahu_dt:Occupancy, " 1min", " 1", " 0min", " 0", Ahu_dt:Occupancy ) );
// I don't understand this next line of code....changing to character and then changing to numeric
// unless you are using JMP to get rid of non numeric data
Column( ahu_dt, "Occupancy" ) << Data type( character ) << Set Data Type( Numeric );
Ahu_dt << Column( "SaFanCmd" );
For Each Row( ahu_dt:SaFanCmd = Match( ahu_dt:SaFanCmd, " 1min", " 1", " 0min", " 0", ahu_dt:SaFanCmd ) );
Column( ahu_dt, "SaFanCmd" ) << Data type( character ) << Set Data Type( Numeric );
Column( Ahu_dt, "DonSteedES " || targetAhu || " ClgVlvCmd" ) << Format( "percent" );
Column( Ahu_dt, "DonSteedES " || targetAhu || " HtgVlvCmd" ) << Format( "percent" );
Column( Ahu_dt, "SaFanCmd" ) << Modeling type( continuous );
// The Graph Builder Platform has a few places where code will not be resolved, and therefore
// once again Substitution() is what is needed to make it work
Eval(
Substitute(
Expr(
optstartgraph = Ahu_dt << Graph Builder(
Size( 1377, 923 ),
Variables(
X( :Timestamp ),
Y( Column( Ahu_dt, "DonSteedES " || targetAhu || " ClgVlvCmd" ) ),
Y( Column( Ahu_dt, "DonSteedES " || targetAhu || " HtgVlvCmd" ), Position( 1 ) ),
Y( :Name( "Raeford, NC Temp" ) ),
Y( Column( Ahu_dt, "DonSteedES " || targetAhu || " DaT" ), Position( 2 ) ),
Y( Column( Ahu_dt, "DonSteedES " || targetAhu || " ZnT" ), Position( 2 ) ),
Y( Column( Ahu_dt, "DonSteedES " || targetAhu || " ZnTStpt" ), Position( 2 ) ),
Y( :SaFanCmd, Position( 2 ), Side( "Right" ) ),
Color( :Occupancy )
),
Elements( Position( 1, 1 ), Line( X, Y( 1 ), Y( 2 ), Color( 0 ), Legend( 5 ) ), Heatmap( X, Legend( 8 ) ) ),
Elements(
Position( 1, 2 ),
Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Color( 0 ), Legend( 6 ) ),
Line( X, Y( 5 ), Color( 0 ), Legend( 7 ) ),
Heatmap( X, Legend( 9 ) )
),
SendToReport(
Dispatch( {__LineClgVlvCmd__}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {__HeatmapClgVlvCmd__}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Line[Raeford, NC Temp...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Line[SaFanCmd] (right)"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Heatmap[Raeford, NC Temp...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch(
{},
"Timestamp",
ScaleBox,
{Min( 3537633600 ), Max( 3538263600 ), Interval( "Hour" ), Inc( 1 ), Minor Ticks( 0 ),
Label Row( Label Orientation( "Angled" ) )}
),
Dispatch( {}, "DonSteedES " || targetAhu || " ClgVlvCmd", ScaleBox, {Min( 0 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Transparency( 0.35 ), gradient(
{Color Theme(
{"mine", 16387, {{79, 16, 79}, {119, 0, 119}, {42, 63, 255}, {0, 170, 170}, {0, 227, 0}, {221, 221, 0
}, {238, 119, 0}, {252, 11, 11}, {158, 33, 33}}, {0, 0.193732193732194, 0.2, 0.495726495726496,
0.501424501424502, 0.507122507122507, 0.943019943019943, 0.95, 0.954415954415954}}
)}
)}
)
), Legend Model(
9,
Properties(
0,
{Transparency( 0.35 ), gradient(
{Color Theme(
{"mine", 16387, {{79, 16, 79}, {119, 0, 119}, {42, 63, 255}, {0, 170, 170}, {0, 227, 0}, {221, 221, 0
}, {238, 119, 0}, {252, 11, 11}, {158, 33, 33}}, {0, 0.193732193732194, 0.2, 0.495726495726496,
0.501424501424502, 0.507122507122507, 0.943019943019943, 0.95, 0.954415954415954}}
)}
)}
)
)}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {5, [0, 1], 8, [2], 6, [-3, -3, 4, 5], 7, [-3], 9, [3]} ), Position(
{0, 1, 2, -3, -3, 4, 5, -3, 3}
)}
)
)
)
),
Expr( __LineClgVlvCmd__ ), "Line[DonSteedES " || targetAhu || " ClgVlvCmd...]",
Expr( __HeatmapClgVlvCmd__ ), "Heatmap[DonSteedES " || targetAhu || " ClgVlvCmd...]"
)
);
// Save the current graphic, replacing the jpg name with the current target Ahu version
optstartgraph << Save Picture( "C:\Projects\Projects\Hoke\Year 1\Jmp\Year 0\DonSteed\Feb16\" || targetAhu || ".jpg", "JPG" );
optstartgraph << close window;
// You can also close the current target data table if you want
close( dt_Ahu, no save );
); // End of For LoopRe: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@himajafeb8 ,
이 시점에서 나는 그것을 작동시킬 수 없었습니다. support@jmp.com으로 연락하겠습니다.
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@uday_guntupalli
작동하지 않습니다. 다른 방법이 있나요?
감사해요
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@himajafeb8 ,
이와 같은 것을 시도한다면 - 본질적으로 정규식을 사용하여 매번 루프에서 Ahu를 시도하고 일치시키되 1 - n에서 증가하도록 조건을 편집하면 효과가 있을 것이라고 생각합니다. 나는 작동 예가 없습니다. 정규식 전면에서 조금 더 시도 할 것입니다.
dt_Raw = Current Data Table();
ColNames = dt_Raw << Get Column Names("String");
RegexToMatch = "^(a|A)hu[0-9]$";
for(i = 1 , i <= N Items(ColNames), i++,
If(!IsMissing(Regex(Char(ColNames[i]),RegexToMatch)),
Col = Column(dt_Raw,i);
Col << Set Selected(1);
);
);Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@uday_guntupalli
샘플 데이터를 첨부했습니다.
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@himajafeb8 ,
데이터 샘플을 공유할 수 있습니까?
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@uday_guntupalli 모든 제안에 감사드립니다. 글을 올리기 전에 마음에 새기겠습니다.
아래에 내 코드를 게시했으며 절대적으로 잘 작동합니다. 하지만 이 코드를 루프에서 실행해야 합니다.
원래 데이터 테이블 "시트 1"이 있습니다. ("Timestamp" , "donsteedOccupancy" , "Name( "Raeford, NC Temp" )" , "x Ahu1 y" 와 같은 300개의 열이 있습니다. "x Ahu1 z" , "x Ahu1 m" ,..."x Ahu2 y" , "x Ahu2 z" , "x Ahu2 m"......."x Ahu70 y" , "x Ahu70 z" , "x Ahu70 m".
처음 3개의 열("Timestamp" , "donsteedOccupancy" , "Name( "Raeford, NC Temp" )" )이 있는 기본 데이터 테이블에서 하위 집합을 만들고 싶습니다. 모두 구성되는 열 이름 "아후1" 새 데이터 테이블에 추가하고 코드에서 언급한 대로 다양한 작업을 수행합니다(추가 열 생성, 열 삭제, 열 속성 변경 및 그래프 생성).
따라서 기본적으로 이 코드에는 "Ahu1"이 있으므로 "Ahu[i]"로 교체하고 루프에서 실행해야 합니다.
나는 이런 일을 하고 싶다.
For( i=0; i<= 52, i++
Data Table("Sheet1") << subset(
Output table( "Ahu[i]"),
columns(Timestamp,..., "x Ahu[i] y" , "x Ahu[i] z" , "x Ahu[i] m"));
Ahu[i]_dt= Data Table("Ahu[i]");
.
.
.
Close( Ahu[i]_dt, save("Ahu[i].jmp") );
"Ahu1"이 있는 코드의 모든 필드는 "Ahu[i]"로 바꿔야 합니다.
도와 주셔서 감사합니다.
original_dt = Current Data Table();
/* Sheet 1 is my original data table. I am creating a subset from original sheet which has column names as : Timestamp,donsteedOccupancy, Name( "Raeford, NC Temp" )
and all the columns which has a string "Ahu1". I am naming this output table as Ahu1.*/
Data Table( "Sheet1" ) << Subset(
Output Table( "Ahu1", link to original data table( 0 ) ),
All rows,
columns(
:Timestamp,
:donSteedOccupancy,
:Name( "Raeford, NC Temp" ),
:DonSteedES Ahu1 ClgVlvCmd,
:DonSteedES Ahu1 HtgVlvCmd,
:DonSteedES Ahu1 DaT,
:DonSteedES Ahu1 SaFanCmd,
:DonSteedES Ahu1 ZnT,
:DonSteedES Ahu1 ZnTStpt
)
);
/* Assigning the output data table to "Ahu1_dt" */
Ahu1_dt = Data Table( "Ahu1" );
/* Creating new columns called "Occupancy and SafanCmd" with formula's and deleting the formula link and also the original column's */
Ahu1_dt << New Column( "Occupancy",
character,
Nominal,
Formula( Munger( :donSteedOccupancy, Length( :donSteedOccupancy ) - 4, Length( :donSteedOccupancy ) ) )
);
Column( "Occupancy" ) << delete formula;
Ahu1_dt << delete columns( "donSteedOccupancy" );
Ahu1_dt << New Column( "SaFanCmd",
character,
Nominal,
Formula( Munger( :DonSteedES Ahu1 SaFanCmd, Length( :DonSteedES Ahu1 SaFanCmd ) - 4, Length( :DonSteedES Ahu1 SaFanCmd ) ) )
);
Column( "SaFanCmd" ) << delete formula;
Ahu1_dt << delete columns( "DonSteedES Ahu1 SaFanCmd" );
/* Using Recode to change values for columns "Occupancy and SaFanCmd " and also changing the column Data Types*/
Ahu1_dt << Column( "Occupancy" );
For Each Row( :Occupancy = Match( :Occupancy, " 1min", " 1", " 0min", " 0", :Occupancy ) );
Column( "Occupancy" ) << Data type( character ) << Set Data Type( Numeric );
Ahu1_dt << Column( "SaFanCmd" );
For Each Row( :SaFanCmd = Match( :SaFanCmd, " 1min", " 1", " 0min", " 0", :SaFanCmd ) );
Column( "SaFanCmd" ) << Data type( character ) << Set Data Type( Numeric );
/* Changing Format for the column's "DonSteedES Ahu1 ClgVlvCmd" and "Ahu1_dt:DonSteedES Ahu1 HtgVlvCmd" */
Ahu1_dt:DonSteedES Ahu1 ClgVlvCmd << Format( "percent" );
Ahu1_dt:DonSteedES Ahu1 HtgVlvCmd << Format( "percent" );
/* Changing Modeling type for the column : SaFanCmd */
Column( "SaFanCmd" ) << Modeling type( continuous );
/* Generating a Graph using Graph Builder for "Ahu1_dt" and assigning it to a object called "optstartgraph" .*/
optstartgraph = Ahu1_dt << Graph Builder(
Size( 1377, 923 ),
Variables(
X( :Timestamp ),
Y( :DonSteedES Ahu1 ClgVlvCmd ),
Y( :DonSteedES Ahu1 HtgVlvCmd, Position( 1 ) ),
Y( :Name( "Raeford, NC Temp" ) ),
Y( :DonSteedES Ahu1 DaT, Position( 2 ) ),
Y( :DonSteedES Ahu1 ZnT, Position( 2 ) ),
Y( :DonSteedES Ahu1 ZnTStpt, Position( 2 ) ),
Y( :SaFanCmd, Position( 2 ), Side( "Right" ) ),
Color( :Occupancy )
),
Elements( Position( 1, 1 ), Line( X, Y( 1 ), Y( 2 ), Color( 0 ), Legend( 5 ) ), Heatmap( X, Legend( 8 ) ) ),
Elements(
Position( 1, 2 ),
Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Y( 4 ), Color( 0 ), Legend( 6 ) ),
Line( X, Y( 5 ), Color( 0 ), Legend( 7 ) ),
Heatmap( X, Legend( 9 ) )
),
SendToReport(
Dispatch( {"Line[DonSteedES Ahu1 ClgVlvCmd...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Heatmap[DonSteedES Ahu1 ClgVlvCmd...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Line[Raeford, NC Temp...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Line[SaFanCmd] (right)"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Heatmap[Raeford, NC Temp...]"}, "", OutlineBox, {Close( 0 )} ),
Dispatch(
{},
"Timestamp",
ScaleBox,
{Min( 3537633600 ), Max( 3538263600 ), Interval( "Hour" ), Inc( 1 ), Minor Ticks( 0 ), Label Row( Label Orientation( "Angled" ) )}
),
Dispatch( {}, "DonSteedES Ahu1 ClgVlvCmd", ScaleBox, {Min( 0 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Transparency( 0.35 ), gradient(
{Color Theme(
{"mine", 16387, {{79, 16, 79}, {119, 0, 119}, {42, 63, 255}, {0, 170, 170}, {0, 227, 0}, {221, 221, 0}, {238, 119, 0},
{252, 11, 11}, {158, 33, 33}}, {0, 0.193732193732194, 0.2, 0.495726495726496, 0.501424501424502, 0.507122507122507,
0.943019943019943, 0.95, 0.954415954415954}}
)}
)}
)
), Legend Model(
9,
Properties(
0,
{Transparency( 0.35 ), gradient(
{Color Theme(
{"mine", 16387, {{79, 16, 79}, {119, 0, 119}, {42, 63, 255}, {0, 170, 170}, {0, 227, 0}, {221, 221, 0}, {238, 119, 0},
{252, 11, 11}, {158, 33, 33}}, {0, 0.193732193732194, 0.2, 0.495726495726496, 0.501424501424502, 0.507122507122507,
0.943019943019943, 0.95, 0.954415954415954}}
)}
)}
)
)}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {5, [0, 1], 8, [2], 6, [-3, -3, 4, 5], 7, [-3], 9, [3]} ), Position( {0, 1, 2, -3, -3, 4, 5, -3, 3} )}
)
)
);
/*Saving the object in jpg format to a specfied file location. */
optstartgraph << Save Picture( "C:\Projects\Projects\Hoke\Year 1\Jmp\Year 0\DonSteed\Feb16\Ahu1.jpg", "JPG" );
/* Closing the object */
optstartgraph << close window;
/* close and save the data table "Ahu1_dt" */
Close( Ahu1_dt, save("C:\Projects\Projects\Hoke\Year 1\Jmp\Year 0\DonSteed\Feb16\Ahu1.jmp") );
Re: 동일한 문자열을 가진 열 이름을 반복하고 하위 집합을 만듭니다.@himajafeb8 ,
몇 가지 제안,
1. 코드를 공유할 때 "JSL 스크립트 삽입" 또는 "코드 삽입" 옵션을 사용하여 공유 중인 내용을 다른 사람이 쉽게 읽을 수 있도록 코드 형식을 지정하십시오.
2. 문제를 분석하고 코드의 어느 부분이 실제로 문제를 일으키는지 설명하십시오.
귀하의 제목으로 가면 다음과 같은 작업이 효과가 있다고 생각합니다. 그러나 더 궁금한 점이 있으면 친절하게 분류해 달라고 요청하십시오.
Clear Log(); Clear Globals();
// Open Sample Data
dt = Open( "$SAMPLE_DATA/Football.jmp" );
// Get Column Names
ColNames = dt << Get Column Names("String");
// Select Desired Columns
DesTerm = "Speed";
DesCols = {}; // Initialize empty list to store selected columns
for(i = 1 , i <= N Items(ColNames), i++,
If(Contains(ColNames[i],DesTerm),
Insert Into(DesCols,i);
Col = Column(dt,i);
Col << Set Selected(1);
);
);
// Subset
dt1 = dt << Subset(Selected Rows(0),Selected Columns(1));