|
KEEPName:
For example, if you have labs 1 to 10 and you want to perform your analysis on labs 3 and 8 only, you can do something like the following
LET TAG = KEEP X XKEEP That is, this command will return a tag variable (TAG) based on the values of X. Values of X that match any value in XKEEP will be set to 1 and values of X that do not match any values in XKEEP will be set to 0.
where <x> is the group-id variable; <xkeep> is a list of values to match against <x>; <tag> is a variable of the same length as <x> that will contain 1 where a match is found and 0 otherwise; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
skip 25
read gear.dat y x
set write decimals 4
.
let xkeep = data 1 3 5 7 8 9
let tag = keep x xkeep
print x tag y
The following output is generated:
---------------------------------------------
X TAG Y
---------------------------------------------
1.0000 1.0000 1.0060
1.0000 1.0000 0.9960
1.0000 1.0000 0.9980
1.0000 1.0000 1.0000
1.0000 1.0000 0.9920
1.0000 1.0000 0.9930
1.0000 1.0000 1.0020
1.0000 1.0000 0.9990
1.0000 1.0000 0.9940
1.0000 1.0000 1.0000
2.0000 0.0000 0.9980
2.0000 0.0000 1.0060
2.0000 0.0000 1.0000
2.0000 0.0000 1.0020
2.0000 0.0000 0.9970
2.0000 0.0000 0.9980
2.0000 0.0000 0.9960
2.0000 0.0000 1.0000
2.0000 0.0000 1.0060
2.0000 0.0000 0.9880
3.0000 1.0000 0.9910
3.0000 1.0000 0.9870
3.0000 1.0000 0.9970
3.0000 1.0000 0.9990
3.0000 1.0000 0.9950
3.0000 1.0000 0.9940
3.0000 1.0000 1.0000
3.0000 1.0000 0.9990
3.0000 1.0000 0.9960
3.0000 1.0000 0.9960
4.0000 0.0000 1.0049
4.0000 0.0000 1.0020
4.0000 0.0000 0.9940
4.0000 0.0000 1.0000
4.0000 0.0000 0.9950
4.0000 0.0000 0.9940
4.0000 0.0000 0.9980
4.0000 0.0000 0.9960
4.0000 0.0000 1.0020
4.0000 0.0000 0.9960
5.0000 1.0000 0.9980
5.0000 1.0000 0.9980
5.0000 1.0000 0.9820
5.0000 1.0000 0.9900
5.0000 1.0000 1.0020
5.0000 1.0000 0.9840
5.0000 1.0000 0.9960
5.0000 1.0000 0.9930
5.0000 1.0000 0.9800
5.0000 1.0000 0.9960
6.0000 0.0000 1.0089
6.0000 0.0000 1.0129
6.0000 0.0000 1.0089
6.0000 0.0000 0.9970
6.0000 0.0000 0.9880
6.0000 0.0000 1.0020
6.0000 0.0000 0.9950
6.0000 0.0000 0.9980
6.0000 0.0000 0.9810
6.0000 0.0000 0.9960
7.0000 1.0000 0.9900
7.0000 1.0000 1.0040
7.0000 1.0000 0.9960
7.0000 1.0000 1.0009
7.0000 1.0000 0.9980
7.0000 1.0000 1.0000
7.0000 1.0000 1.0180
7.0000 1.0000 1.0100
7.0000 1.0000 0.9960
7.0000 1.0000 1.0020
8.0000 1.0000 0.9980
8.0000 1.0000 1.0000
8.0000 1.0000 1.0060
8.0000 1.0000 1.0000
8.0000 1.0000 1.0020
8.0000 1.0000 0.9960
8.0000 1.0000 0.9980
8.0000 1.0000 0.9960
8.0000 1.0000 1.0020
8.0000 1.0000 1.0060
9.0000 1.0000 1.0020
9.0000 1.0000 0.9980
9.0000 1.0000 0.9960
9.0000 1.0000 0.9950
9.0000 1.0000 0.9960
9.0000 1.0000 1.0040
9.0000 1.0000 1.0040
9.0000 1.0000 0.9980
9.0000 1.0000 0.9990
9.0000 1.0000 0.9910
10.0000 0.0000 0.9910
10.0000 0.0000 0.9950
10.0000 0.0000 0.9840
10.0000 0.0000 0.9940
10.0000 0.0000 0.9970
10.0000 0.0000 0.9970
10.0000 0.0000 0.9910
10.0000 0.0000 0.9980
10.0000 0.0000 1.0040
10.0000 0.0000 0.9970
Date created: 06/23/2011 |