2つの日付がmm / dd / yyyyの形式でテキストファイルに保存されています。この日付範囲にあるデータを分析し、他のすべてのデータを削除する必要があります。
これどうやってするの?
テキストファイルから読み込まれた日付に基づいて分析を実行する方法の2つの例を以下に示します。
Names Default To Here( 1 );
// Create a sample data table
dt = New Table( "Example",
Add Rows( 7 ),
New Column( "ACTUAL_SHORT_DATE",
Numeric,
"Continuous",
Format( "m/d/y", 12 ),
Input Format( "m/d/y" ),
Set Values(
[3612470400, 3614025600, 3618777600, 3614457600, 3613420800,
3578947200, 3613939200]
),
Set Display Width( 154 )
),
New Column( "Sample Data",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[0.865467654397147, 0.551025322305757, -0.780534757628151,
0.590164622893679, -0.084595197133406, 0.93192690045854,
-0.652714499840696]
)
)
);
// Read the data from the text file
textValue = Load Text File( "C:\Temp\DateRange.txt" );
// Parse out the start and end dates
startDate = Informat( Word( 1, textValue, " " ) );
endDate = Informat( Word( 2, textValue, " " ) );
// Select the data that falls within the start
// and end dates
dt << select where(
:ACTUAL_SHORT_DATE > startDate & :ACTUAL_SHORT_DATE < endDate
);
// Subset
dtSub = dt << Subset(
Selected Rows( 0 ),
Rows( [2, 4, 5, 7] ),
Selected columns only( 0 )
);
// Analyze the data
dtSub << Bivariate( Y( :Sample Data ), X( :ACTUAL_SHORT_DATE ) );
Names Default To Here( 1 );
// Create a sample data table
dt = New Table( "Example",
Add Rows( 7 ),
New Column( "ACTUAL_SHORT_DATE",
Numeric,
"Continuous",
Format( "m/d/y", 12 ),
Input Format( "m/d/y" ),
Set Values(
[3612470400, 3614025600, 3618777600, 3614457600, 3613420800,
3578947200, 3613939200]
),
Set Display Width( 154 )
),
New Column( "Sample Data",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[0.865467654397147, 0.551025322305757, -0.780534757628151,
0.590164622893679, -0.084595197133406, 0.93192690045854,
-0.652714499840696]
)
)
);
// Read the data from the text file
textValue = Load Text File( "C:\Temp\DateRange.txt" );
// Parse out the start and end dates
startDate = Informat( Word( 1, textValue, " " ) );
endDate = Informat( Word( 2, textValue, " " ) );
// Select the data that falls outside the start
// and end dates
dt << select where(
:ACTUAL_SHORT_DATE < startDate | :ACTUAL_SHORT_DATE > endDate
);
// Hide and exclude the selected rows
dt << Hide and Exclude;
dt << clear select;
// Analyze the data
dt << Bivariate( Y( :Sample Data ), X( :ACTUAL_SHORT_DATE ) );
response.Attachingサンプルテキストファイルをありがとう。有効なJMP日付列も含むjmpテーブルにすべてのデータがあります。
1。 テキストファイルの構造はどのようなものですか?
2。分析するデータはすでにJMPデータテーブルにありますか?
3。分析対象のデータに有効なJMP日付列がありますか?
基本的に、あなたがすることは、彼がテキストファイルから日付を読むことです。 次に、分析テーブルでその要件を満たすすべての行を見つけ、それらの行を新しいデータテーブルにサブセット化します。 最後に、サブセット化されたデータテーブルに対して分析を実行します。
あなたがテキストファイルとデータファイル/テーブルの構造についてより多くの詳細を提供することができれば、私はあなたのための解決策を見つけるかもしれません。