I have generated a new variable (Ambtemp2oC_01) to capture temperature readings above two degrees Celsius for different sensors. Now I need to generate a new variable from Ambtemp2oC_01 to capture the 18th observation onwards for each data blocks (that is all data observations before a blank space) for each sensor. Below is a sample of the data.
Observations | SerialNumber | Ambtemp2oC_01 |
1 | 1 | |
2 | 1 | |
3 | 1 | |
4 | 1 | 6.89 |
5 | 1 | 9.56 |
6 | 1 | 12 |
7 | 1 | 11.94 |
8 | 1 | 12.22 |
9 | 1 | 12.89 |
10 | 1 | 13.61 |
11 | 1 | 14.44 |
12 | 1 | 15.56 |
13 | 1 | 18.78 |
14 | 1 | 17.28 |
15 | 1 | 16.33 |
16 | 1 | 16.67 |
17 | 1 | 17.17 |
18 | 1 | 17.83 |
19 | 1 | 18.44 |
20 | 1 | 18.83 |
21 | 1 | 19.11 |
22 | 1 | 19.33 |
23 | 1 | 19.56 |
24 | 1 | 19.72 |
25 | 1 | 19.83 |
26 | 1 | 19.89 |
27 | 1 | 20 |
28 | 1 | 20.11 |
29 | 1 | 20.22 |
30 | 1 | 20.28 |
31 | 1 | 20.33 |
32 | 1 | 20.39 |
33 | 1 | 20.44 |
34 | 1 | 20.56 |
35 | 1 | 20.67 |
36 | 1 | 20.72 |
37 | 1 | 20.83 |
38 | 1 | 22.72 |
39 | 1 | 23.17 |
40 | 1 | 23.17 |
41 | 1 | 23.11 |
42 | 1 | 23.06 |
43 | 1 | 23.17 |
44 | 2 | 15.94 |
45 | 2 | 15.11 |
46 | 2 | 15.06 |
47 | 2 | 15.06 |
48 | 2 | 15.06 |
49 | 2 | 15 |
50 | 2 | 15 |
51 | 2 | 15 |
52 | 2 | 15 |
53 | 2 | 15.06 |
54 | 2 | 15.06 |
55 | 2 | 15.17 |
56 | 2 | 15.5 |
57 | 2 | 16.11 |
58 | 2 | 16.5 |
59 | 2 | 16.78 |
60 | 2 | 17.11 |
61 | 2 | 17.39 |
62 | 2 | 17.67 |
63 | 2 | 17.94 |
64 | 2 | 18.22 |
65 | 2 | 18.44 |
66 | 2 | 18.72 |
67 | 2 | 18.94 |
68 | 2 | 19.17 |
69 | 2 | 19.39 |
70 | 2 | |
71 | 2 | |
72 | 2 | |
73 | 2 | |
74 | 2 | 2.06 |
75 | 2 | 2.11 |
76 | 2 | 2.11 |
77 | 2 | 2.17 |
78 | 2 | 2.22 |
79 | 2 | 2.28 |
80 | 2 | 2.33 |
81 | 2 | 2.33 |
82 | 2 | 2.39 |
83 | 2 | 2.44 |
84 | 2 | 2.44 |
85 | 2 | 2.5 |
86 | 2 | 2.56 |
87 | 2 | 2.56 |
88 | 2 | 2.61 |
89 | 2 | 2.67 |
90 | 2 | 2.67 |
91 | 2 | 2.72 |
92 | 2 | 2.78 |
93 | 2 | 2.78 |
94 | 2 | 2.83 |
95 | 2 | 2.83 |
96 | 2 | 2.89 |
97 | 2 | 2.89 |
98 | 2 | 2.94 |
99 | 2 | 2.94 |
100 | 2 | 3 |
101 | 2 | 3 |
102 | 2 | 3.06 |
103 | 2 | 3.06 |
104 | 2 | |
105 | 2 | |
106 | 2 |
Roland
0 Response to Need help generating new variable to capture 18th observation onwards for each data group
Post a Comment