I have 8 RTX GPUs. When run p2pBandwidthLatencyTest, The latencies between GPU0 and GPU1, GPU2 and GPU3, GPU4 and GPU5, GPU6 and GPU7 is 40,000 times slower than other pairs:
P2P=Enabled Latency (P2P Writes) Matrix (us)
GPU 0 1 2 3 4 5 6 7
0 1.80 49354.72 1.70 1.70 1.74 1.74 1.74 1.72
1 49354.84 1.37 1.70 1.69 1.74 1.76 1.73 1.72
2 1.88 1.81 1.73 49355.00 1.79 1.76 1.76 1.75
3 1.88 1.79 49354.85 1.33 3.79 3.84 3.88 3.91
4 1.89 1.88 1.90 1.87 1.72 49354.96 3.49 3.56
5 2.30 1.93 1.88 1.89 49354.89 1.32 3.63 3.60
6 2.55 2.53 2.37 2.29 2.24 2.26 3.50 49354.77
7 2.30 2.27 2.29 1.87 1.82 1.83 49354.85 1.36
Compare it with when peer-to-peer is disabled:
P2P=Disabled Latency Matrix (us)
GPU 0 1 2 3 4 5 6 7
0 1.80 14.31 13.86 13.49 14.52 13.89 13.58 13.58
1 13.71 1.82 14.44 13.95 14.65 13.62 15.05 15.20
2 13.38 14.23 1.73 16.59 13.77 15.44 14.10 13.64
3 12.68 15.62 12.50 1.77 14.92 15.01 15.17 14.87
4 13.51 13.60 15.09 13.40 1.27 12.48 12.68 19.47
5 14.92 13.84 13.42 13.42 16.53 1.30 16.37 16.60
6 14.29 13.62 14.66 13.62 14.90 13.70 1.32 14.33
7 14.26 13.42 14.35 13.53 16.89 14.26 17.03 1.36
Is this normal?
It turns out the super slow peer-to-peer is abnormal.
After I disable IOMMU (Intel VT-d) in the BIOS, the problem is gone:
P2P=Enabled Latency (P2P Writes) Matrix (us)
GPU 0 1 2 3 4 5 6 7
0 1.34 1.22 1.68 1.69 1.71 1.70 1.75 1.73
1 1.20 1.38 1.70 1.67 1.71 1.75 1.75 1.72
2 1.69 1.67 1.29 1.20 1.73 1.75 1.75 1.75
3 1.69 1.66 1.17 1.29 1.74 1.75 1.72 1.73
4 1.72 1.76 1.74 1.70 1.32 1.13 1.66 1.70
5 1.74 1.73 1.75 1.74 1.18 1.28 1.67 1.69
6 1.75 1.74 1.74 1.72 1.67 1.68 1.31 1.19
7 1.76 1.75 1.73 1.73 1.67 1.69 1.18 1.32
It seems the problem is the same as or is very similar to discussions in:
https://github.com/pytorch/pytorch/issues/1637
https://github.com/pytorch/pytorch/issues/24081
A few possible solutions are mentioned in the discussions:
Disable IOMMU:
https://github.com/pytorch/pytorch/issues/1637#issuecomment-338268158
https://github.com/pytorch/pytorch/issues/1637#issuecomment-401422046
Disable ACS:
https://github.com/pytorch/pytorch/issues/24081#issuecomment-557074611
https://github.com/pytorch/pytorch/issues/24081#issuecomment-547976127
My system having the problem only had IOMMU enabled in the BIOS. ACS was not turned on as lspci -vvv | grep ACS got back nothing.
==============================
Background on I/O MMU:
https://en.wikipedia.org/wiki/X86_virtualization#I/O_MMU_virtualization_(AMD-Vi_and_Intel_VT-d)
It's part of the x86 virtualization. It's the virtualization done by the chipset. Besides the name IOMMU, it's also called AMD-Vi or Intel VT-d. Not to be confused with AMD-V and Intel VT-x which are virtualization via the CPU.
Related
I have a sample code here. This works perfectly in chrome, edge, firefox. But it seems to be an issue in IE. I use IE11.
<div class="text">
<span>
<svg xmlns="http://www.w3.org/2000/svg" class="image" viewBox="0 0 512 512"><path d="M 417.1 509.3 h -0.4 c -3.5 -0.3 -6.5 -1.8 -8.7 -4.3 c -2.2 -2.6 -3.3 -5.8 -3.1 -9.3 v -0.2 l 6.3 -49.2 C 366.1 485.4 308.4 507 248.5 507 c -9.7 0 -19.7 -0.6 -29.4 -1.8 c -65.8 -7.9 -124.6 -40.9 -165.5 -93.1 C 14.1 361.7 -3.9 297.6 3 231.7 c 0.1 -1.3 0.3 -2.6 0.4 -3.9 c 0.3 -3 1.4 -5.6 3 -8 c 3.4 -5 8.9 -7.9 14.9 -7.9 c 0.7 0 1.5 0 2.2 0.1 c 4.8 0.5 9.1 3 12.1 6.8 c 3 3.7 4.2 8.4 3.8 13 v 0.3 c -0.1 1.1 -0.2 2.2 -0.4 3.3 c -5.9 56.5 9.4 111.4 43.1 154.3 c 35 44.5 85.2 72.8 141.5 79.5 c 8.4 1 16.8 1.5 25.2 1.5 c 51.4 0 100.9 -18.6 139.5 -52.3 c 1.6 -1.4 3.1 -2.7 4.7 -4.1 l -60.6 -1.5 h -0.2 c -4.5 -0.3 -8.8 -2.3 -11.4 -5.3 c -1.8 -2.1 -2.7 -4.8 -2.4 -7.4 v -0.2 l 0.2 -5.4 v -0.4 c 0.3 -2.1 1.1 -4.1 2.3 -5.9 c 2.6 -3.8 7.1 -6.2 11.6 -6.2 h 0.5 l 96.1 2.6 h 0.4 l 6.3 0.3 c 3.6 0.2 6.8 1.7 9.1 4.4 c 2.3 2.6 3.4 6 3.1 9.6 l -0.6 6.3 l -0.1 0.4 l -11.6 93.7 c -0.2 2.2 -1 4.2 -2.1 5.8 c -2.2 3.3 -6 5.2 -10.6 5.2 h -1 l -4.9 -1 Z m 75.2 -210.7 c -0.7 0 -1.5 0 -2.1 -0.1 c -9.7 -1.2 -16.8 -10 -15.8 -19.8 v -0.3 c 0.1 -1 0.2 -2 0.3 -3.1 c 5.8 -55.1 -9.9 -109.4 -44.2 -153.1 c -35 -44.5 -85.2 -72.8 -141.4 -79.5 c -8.9 -1.1 -17.8 -1.6 -26.5 -1.6 c -20.6 0 -41 3 -60.7 8.8 c -28.4 8.5 -54.1 22.6 -76.5 42.1 c -5 4.3 -9.7 8.9 -14.3 13.6 l 61.4 1.5 h 0.2 c 4.2 0.3 8.4 2.3 10.9 5.3 c 2.5 2.9 2.9 5.8 2.6 7.8 v 0.3 l 0.1 5 l -0.1 0.6 c -0.3 2 -1.1 4 -2.2 5.7 c -2.6 3.8 -7.1 6.2 -11.6 6.2 h -0.6 l -96.1 -2.6 h -0.3 l -6.5 -0.3 c -3.6 -0.2 -6.8 -1.7 -9.1 -4.4 c -2.3 -2.6 -3.4 -6 -3.1 -9.6 l 0.6 -6.3 l 0.1 -0.4 L 69 20.7 c 0.2 -2.2 1.1 -4.3 2.3 -6.1 c 2.5 -3.7 6.7 -6 11.1 -6.2 h 1.1 l 5 1.2 h 0.4 c 2.9 0.2 5.3 1.6 7.3 3.8 c 2.4 2.9 3.8 7.2 3.5 11.2 v 0.3 l -6 47.3 c 2.6 -2.5 5.3 -5 7.9 -7.3 C 127.9 42 158 25.4 191.2 15.4 C 214.3 8.5 238.3 5 262.5 5 c 10.2 0 20.6 0.6 30.9 1.9 C 359.2 14.7 418 47.8 458.9 100 c 40.1 51.1 58.5 114.6 51.7 179.1 c -0.1 1.3 -0.3 2.4 -0.4 3.7 c -0.3 2.9 -1.4 5.6 -3 8 c -3.4 4.8 -9 7.8 -14.9 7.8 Z" /></svg>
sample text after the svg image
</span>
</div>
<style>
.text{
margin: 55px 0px;
width: 70%;
}
.image {
width: 15px;
margin-right: 10px;
}
</style>
I expect the same output it shows in chrome.
I fixed you issue in IE
.text{
margin: 55px 0px;
width: 70%;
}
.image {
width: 15px;
margin-right: 10px;
vertical-align: middle;
}
<div class="text">
<span>
<svg xmlns="http://www.w3.org/2000/svg" class="image" viewBox="0 0 512 512"><path d="M 417.1 509.3 h -0.4 c -3.5 -0.3 -6.5 -1.8 -8.7 -4.3 c -2.2 -2.6 -3.3 -5.8 -3.1 -9.3 v -0.2 l 6.3 -49.2 C 366.1 485.4 308.4 507 248.5 507 c -9.7 0 -19.7 -0.6 -29.4 -1.8 c -65.8 -7.9 -124.6 -40.9 -165.5 -93.1 C 14.1 361.7 -3.9 297.6 3 231.7 c 0.1 -1.3 0.3 -2.6 0.4 -3.9 c 0.3 -3 1.4 -5.6 3 -8 c 3.4 -5 8.9 -7.9 14.9 -7.9 c 0.7 0 1.5 0 2.2 0.1 c 4.8 0.5 9.1 3 12.1 6.8 c 3 3.7 4.2 8.4 3.8 13 v 0.3 c -0.1 1.1 -0.2 2.2 -0.4 3.3 c -5.9 56.5 9.4 111.4 43.1 154.3 c 35 44.5 85.2 72.8 141.5 79.5 c 8.4 1 16.8 1.5 25.2 1.5 c 51.4 0 100.9 -18.6 139.5 -52.3 c 1.6 -1.4 3.1 -2.7 4.7 -4.1 l -60.6 -1.5 h -0.2 c -4.5 -0.3 -8.8 -2.3 -11.4 -5.3 c -1.8 -2.1 -2.7 -4.8 -2.4 -7.4 v -0.2 l 0.2 -5.4 v -0.4 c 0.3 -2.1 1.1 -4.1 2.3 -5.9 c 2.6 -3.8 7.1 -6.2 11.6 -6.2 h 0.5 l 96.1 2.6 h 0.4 l 6.3 0.3 c 3.6 0.2 6.8 1.7 9.1 4.4 c 2.3 2.6 3.4 6 3.1 9.6 l -0.6 6.3 l -0.1 0.4 l -11.6 93.7 c -0.2 2.2 -1 4.2 -2.1 5.8 c -2.2 3.3 -6 5.2 -10.6 5.2 h -1 l -4.9 -1 Z m 75.2 -210.7 c -0.7 0 -1.5 0 -2.1 -0.1 c -9.7 -1.2 -16.8 -10 -15.8 -19.8 v -0.3 c 0.1 -1 0.2 -2 0.3 -3.1 c 5.8 -55.1 -9.9 -109.4 -44.2 -153.1 c -35 -44.5 -85.2 -72.8 -141.4 -79.5 c -8.9 -1.1 -17.8 -1.6 -26.5 -1.6 c -20.6 0 -41 3 -60.7 8.8 c -28.4 8.5 -54.1 22.6 -76.5 42.1 c -5 4.3 -9.7 8.9 -14.3 13.6 l 61.4 1.5 h 0.2 c 4.2 0.3 8.4 2.3 10.9 5.3 c 2.5 2.9 2.9 5.8 2.6 7.8 v 0.3 l 0.1 5 l -0.1 0.6 c -0.3 2 -1.1 4 -2.2 5.7 c -2.6 3.8 -7.1 6.2 -11.6 6.2 h -0.6 l -96.1 -2.6 h -0.3 l -6.5 -0.3 c -3.6 -0.2 -6.8 -1.7 -9.1 -4.4 c -2.3 -2.6 -3.4 -6 -3.1 -9.6 l 0.6 -6.3 l 0.1 -0.4 L 69 20.7 c 0.2 -2.2 1.1 -4.3 2.3 -6.1 c 2.5 -3.7 6.7 -6 11.1 -6.2 h 1.1 l 5 1.2 h 0.4 c 2.9 0.2 5.3 1.6 7.3 3.8 c 2.4 2.9 3.8 7.2 3.5 11.2 v 0.3 l -6 47.3 c 2.6 -2.5 5.3 -5 7.9 -7.3 C 127.9 42 158 25.4 191.2 15.4 C 214.3 8.5 238.3 5 262.5 5 c 10.2 0 20.6 0.6 30.9 1.9 C 359.2 14.7 418 47.8 458.9 100 c 40.1 51.1 58.5 114.6 51.7 179.1 c -0.1 1.3 -0.3 2.4 -0.4 3.7 c -0.3 2.9 -1.4 5.6 -3 8 c -3.4 4.8 -9 7.8 -14.9 7.8 Z" /></svg>
<span>sample text after the svg image</span>
</span>
</div>
I would like to download the 10-year federal note yield from the treasury website: https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield
To parse the above webpage and retrieve the most recent 10 yr treasury note yield, I used to follow the instructions provided here:
Parsing 10-year federal note yield from the website
library(httr)
URL = "https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield"
urldata <- GET(URL)
data <- readHTMLTable(rawToChar(urldata$content),
stringsAsFactors = FALSE)
data <- as.data.frame((data[69]))
names(data) <- gsub("NULL.","", names(data)) # Take out "NULL."
But it no longer works.
Any thoughts what may be wrong or alternative suggestions?
This does not answer the specific question of why your code no longer works. Here is an alternative using rvest package which simplifies many scraping operations. In particular below, the selection of the table is made with the class id CSS selector .t-chart. This makes it much more tolerant of page formatting changes. The chaining with operator %>% makes for very compact code.
library(rvest)
t_url = "https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield"
rates <- read_html(t_url) %>%
html_node(".t-chart") %>%
html_table()
rates
# Date 1 mo 3 mo 6 mo 1 yr 2 yr 3 yr 5 yr 7 yr 10 yr 20 yr 30 yr
# 1 04/03/17 0.73 0.79 0.92 1.02 1.24 1.47 1.88 2.16 2.35 2.71 2.98
# 2 04/04/17 0.77 0.79 0.92 1.03 1.25 1.47 1.88 2.16 2.36 2.72 2.99
# 3 04/05/17 0.77 0.80 0.93 1.03 1.24 1.44 1.85 2.14 2.34 2.71 2.98
# 4 04/06/17 0.78 0.79 0.94 1.05 1.24 1.45 1.87 2.15 2.34 2.72 2.99
# 5 04/07/17 0.77 0.82 0.95 1.08 1.29 1.52 1.92 2.20 2.38 2.74 3.00
# 6 04/10/17 0.77 0.82 0.97 1.07 1.29 1.52 1.91 2.18 2.37 2.72 2.99
# 7 04/11/17 0.74 0.82 0.94 1.05 1.24 1.45 1.84 2.11 2.32 2.67 2.93
# 8 04/12/17 0.77 0.81 0.95 1.04 1.24 1.44 1.81 2.09 2.28 2.65 2.92
# 9 04/13/17 0.76 0.81 0.94 1.03 1.21 1.40 1.77 2.05 2.24 2.62 2.89
Here is my own implementation of gradient descent algorithm in matlab language
m = height(data_training); % number of samples
cols = {'x1', 'x2', 'x3', 'x4', 'x5', 'x6',...
'x7', 'x8','x9', 'x10', 'x11', 'x12', 'x13', 'x14', 'x15'};
y = data_training{:, {'y'}}';
X = [ones(m,1) data_training{:,cols}]';
theta = zeros(1,width(data_training));
alpha = 1e-2; % learning rate
iter = 400;
dJ = zeros(1,width(data_training));
J_seq = zeros(1, iter);
for n = 1:iter
err = (theta*X - y);
for j = 1:width(data_training)
dJ(j) = 1/m*sum(err*X(j,:)');
end
J = 1/(2*m)*sum((theta*X-y).^2);
theta = theta - alpha.*dJ;
J_seq(n) = J;
if mod(n,100) == 0
plot(1:iter, J_seq);
end
end
EDIT
WORKING ALGORITHM
I have applied this algorithm to the following training dataset. The last column is the output variable. Here we have 15 different features.
For a reason for me unknown, when I plot the cost function J after 50 iterations in order to check if it is going towards the convergence, I see it doesn't convergence. Can you help me to understand? is it the implementation wrong or should I make something?
36 27 71 8.1 3.34 11.4 81.5 3243 8.8 42.6 11.7 21 15 59 59 921.87
35 23 72 11.1 3.14 11 78.8 4281 3.6 50.7 14.4 8 10 39 57 997.88
44 29 74 10.4 3.21 9.8 81.6 4260 0.8 39.4 12.4 6 6 33 54 962.35
47 45 79 6.5 3.41 11.1 77.5 3125 27.1 50.2 20.6 18 8 24 56 982.29
43 35 77 7.6 3.44 9.6 84.6 6441 24.4 43.7 14.3 43 38 206 55 1071.3
53 45 80 7.7 3.45 10.2 66.8 3325 38.5 43.1 25.5 30 32 72 54 1030.4
43 30 74 10.9 3.23 12.1 83.9 4679 3.5 49.2 11.3 21 32 62 56 934.7
45 30 73 9.3 3.29 10.6 86 2140 5.3 40.4 10.5 6 4 4 56 899.53
36 24 70 9 3.31 10.5 83.2 6582 8.1 42.5 12.6 18 12 37 61 1001.9
36 27 72 9.5 3.36 10.7 79.3 4213 6.7 41 13.2 12 7 20 59 912.35
52 42 79 7.7 3.39 9.6 69.2 2302 22.2 41.3 24.2 18 8 27 56 1017.6
33 26 76 8.6 3.2 10.9 83.4 6122 16.3 44.9 10.7 88 63 278 58 1024.9
40 34 77 9.2 3.21 10.2 77 4101 13 45.7 15.1 26 26 146 57 970.47
35 28 71 8.8 3.29 11.1 86.3 3042 14.7 44.6 11.4 31 21 64 60 985.95
37 31 75 8 3.26 11.9 78.4 4259 13.1 49.6 13.9 23 9 15 58 958.84
35 46 85 7.1 3.22 11.8 79.9 1441 14.8 51.2 16.1 1 1 1 54 860.1
36 30 75 7.5 3.35 11.4 81.9 4029 12.4 44 12 6 4 16 58 936.23
15 30 73 8.2 3.15 12.2 84.2 4824 4.7 53.1 12.7 17 8 28 38 871.77
31 27 74 7.2 3.44 10.8 87 4834 15.8 43.5 13.6 52 35 124 59 959.22
30 24 72 6.5 3.53 10.8 79.5 3694 13.1 33.8 12.4 11 4 11 61 941.18
31 45 85 7.3 3.22 11.4 80.7 1844 11.5 48.1 18.5 1 1 1 53 891.71
31 24 72 9 3.37 10.9 82.8 3226 5.1 45.2 12.3 5 3 10 61 871.34
42 40 77 6.1 3.45 10.4 71.8 2269 22.7 41.4 19.5 8 3 5 53 971.12
43 27 72 9 3.25 11.5 87.1 2909 7.2 51.6 9.5 7 3 10 56 887.47
46 55 84 5.6 3.35 11.4 79.7 2647 21 46.9 17.9 6 5 1 59 952.53
39 29 76 8.7 3.23 11.4 78.6 4412 15.6 46.6 13.2 13 7 33 60 968.66
35 31 81 9.2 3.1 12 78.3 3262 12.6 48.6 13.9 7 4 4 55 919.73
43 32 74 10.1 3.38 9.5 79.2 3214 2.9 43.7 12 11 7 32 54 844.05
11 53 68 9.2 2.99 12.1 90.6 4700 7.8 48.9 12.3 648 319 130 47 861.83
30 35 71 8.3 3.37 9.9 77.4 4474 13.1 42.6 17.7 38 37 193 57 989.26
50 42 82 7.3 3.49 10.4 72.5 3497 36.7 43.3 26.4 15 10 34 59 1006.5
60 67 82 10 2.98 11.5 88.6 4657 13.6 47.3 22.4 3 1 1 60 861.44
30 20 69 8.8 3.26 11.1 85.4 2934 5.8 44 9.4 33 23 125 64 929.15
25 12 73 9.2 3.28 12.1 83.1 2095 2 51.9 9.8 20 11 26 50 857.62
45 40 80 8.3 3.32 10.1 70.3 2682 21 46.1 24.1 17 14 78 56 961.01
46 30 72 10.2 3.16 11.3 83.2 3327 8.8 45.3 12.2 4 3 8 58 923.23
Not sure I'm following your logic, but it's quite obvious that 'e' (the error) should not be squared.
Let's see what you should be using.
theta is a column vector of unknowns, y is a column vector of measurements and X is the model matrix where each row is an 'example'. So you need to find theta such that:
y = X*theta
Or equivalently, use an optimization method to find theta minimizing the current squared error (this is what makes this a convex optimization problem):
e[n] = (y - X*theta[n])
e[n]^2 --> minimize
Gradient descent uses the gradient of the error function (with respect to theta) to update the theta vector:
theta[n+1] = theta[n] - alpha*2*X'*e[n]
(Note that e[n] and theta[n] are vectors. This is math notation - not matlab's)
So you see that e[n] is not squared in the update equation.
I have growth data of trees for the month of June across multiple years. Around the beginning of June in 2012, 2013 and 2014, I planted seeds and went back to those seeds near the end of the month to see if the seeds germinated and the tree was alive, or didn't germinate and the tree was dead. For each sample (each seed), the number of growing days were calculated.
Sample_ID Tree_Type Check_Date Growing_Days Status Max_Temp Min_Temp Mean_Temp Total_mm_Rain
1 Spruce 25-06-2012 16 Alive
2 Spruce 28-06-2012 25 Alive
3 Fir 23-06-2012 19 Dead
4 Spruce 29-06-2012 23 Alive
5 Fir 28-06-2012 16 Alive
6 Fir 25-06-2013 18 Alive
7 Fir 26-06-2013 15 Dead
8 Spruce 28-06-2013 17 Alive
9 Fir 30-06-2013 24 Dead
10 Fir 27-06-2013 19 Alive
11 Spruce 21-06-2014 16 Alive
12 Fir 24-06-2014 18 Alive
13 Fir 28-06-2014 14 Dead
14 Spruce 29-06-2014 18 Alive
15 Spruce 30-06-2014 15 Dead
What I would like to is see how weather affected my trees. I have pulled historical weather data as a separate dataframe and would like to add to each sample row the Total_mm_Rain that fell during the growing days, along with Max, Min and Mean Temperatures of that growing period.
Date Max_Temp Min_Temp Mean_Temp Total_mm_Rain
01-05-2012 9 3 6 0
02-05-2012 9 2.5 5.8 0
03-05-2012 9.5 -2.5 3.5 4.6
04-05-2012 11 2.5 6.8 0.6
05-05-2012 10 2 6 1.8
06-05-2012 14 -2 6 0
07-05-2012 18 -2 8 0
08-05-2012 21.5 1 11.3 0
09-05-2012 17.5 4.5 11 2.8
10-05-2012 8 0.5 4.3 0
11-05-2012 14.5 -6 4.3 0
12-05-2012 19.5 -3 8.3 0
13-05-2012 23.5 -1 11.3 0
14-05-2012 25 0.5 12.8 0
15-05-2012 27.5 1.5 14.5 0
16-05-2012 24 2.5 13.3 0
17-05-2012 15.5 4.5 10 10
18-05-2012 12.5 2 7.3 0.4
19-05-2012 15 -2 6.5 0
20-05-2012 17.5 -2 7.8 0.4
21-05-2012 15.5 6.5 11 2.2
22-05-2012 12.5 8 10.3 0.4
23-05-2012 14 5 9.5 9.6
24-05-2012 10 1 5.5 1
25-05-2012 11 3 7 3
26-05-2012 13 2 7.5 0
27-05-2012 11.5 3 7.3 0
28-05-2012 17.5 3 10.3 1.2
29-05-2012 15.5 4 9.8 0.2
30-05-2012 17.6 4 10.8 0
31-05-2012 16 6.5 11.3 0.2
01-05-2013 11.5 -4.9 3.3 0
02-05-2013 17.1 -4.5 6.3 2
03-05-2013 15 5.1 10.1 0
04-05-2013 18.9 -0.2 9.4 0
05-05-2013 24.2 -1.8 11.2 0
06-05-2013 26.6 -0.1 13.3 0
07-05-2013 21.9 1.5 11.7 0
08-05-2013 24.6 4.9 14.8 0
09-05-2013 25.5 0.9 13.2 0
10-05-2013 21.4 2 11.7 0
11-05-2013 26.2 3.9 15.1 0
12-05-2013 25 4.5 14.8 0.2
13-05-2013 19.9 10.2 15.1 11
14-05-2013 13.1 5 9.1 0.2
15-05-2013 17.2 -1.7 7.8 0
16-05-2013 15.3 4.1 9.7 0
17-05-2013 18.6 2.4 10.5 1.6
18-05-2013 15.5 3 9.3 5.6
19-05-2013 12.7 5.6 9.2 1
20-05-2013 22 5 13.5 0
21-05-2013 21.9 1.9 11.9 0
22-05-2013 12 7 9.5 24.8
23-05-2013 7.3 0.1 3.7 4.6
24-05-2013 12.3 1.5 6.9 0.2
25-05-2013 13.7 3.7 8.7 0
26-05-2013 19 -1.5 8.8 0
27-05-2013 20 3.5 11.8 0
28-05-2013 17 5.5 11.3 0
29-05-2013 20.1 7 13.6 0.8
30-05-2013 13.5 7.5 10.5 2.4
31-05-2013 9.9 7 8.5 7.8
01-06-2014 8.8 -1 3.9 3.6
02-06-2014 11.4 0.5 6 0
03-06-2014 11.6 -0.7 5.5 0
04-06-2014 16.9 -3.6 6.7 0
05-06-2014 19.6 -2.3 8.7 0
06-06-2014 16.7 0.9 8.8 0
07-06-2014 9.3 5 7.2 1
08-06-2014 10.1 2.8 6.5 0.4
09-06-2014 13.3 -5.2 4.1 0
10-06-2014 16 -4.3 5.9 0
11-06-2014 17 -1.5 7.8 1.6
12-06-2014 13.9 4.7 9.3 0.3
13-06-2014 16.5 -3.4 6.6 0
14-06-2014 22.9 -2.3 10.3 0
15-06-2014 27 0.6 13.8 0
16-06-2014 29.6 4.1 16.9 0
17-06-2014 29.1 3.3 16.2 0
18-06-2014 28.1 5.6 16.9 0
19-06-2014 25.9 8.1 17 0.2
20-06-2014 15.9 8.7 12.3 3.1
21-06-2014 21.3 8.8 15.1 0.4
22-06-2014 23.7 6.7 15.2 6.9
23-06-2014 18.4 9.3 13.9 0
24-06-2014 18.2 4 11.1 6.4
25-06-2014 16 6.5 11.3 10
26-06-2014 12.2 3.6 7.9 1.9
27-06-2014 11.6 3.5 7.6 2.6
28-06-2014 13.7 4.4 9.1 5.6
29-06-2014 11.7 5.5 8.6 3.4
30-06-2014 17.4 7 12.2 0
I have tried using table functions as well as diving into the idea of converting dates to numbers (as in excel) and summing based on dates as numbers instead of dates, but this is above my knowledge of R.
I have multiple number of rows. I want to change into column wise.
My data
PondCrop DOC ABW TargetABW
01PA01-18 7 0 0.21
01PA01-18 15 0.59 0.77
01PA01-18 22 1.24 1.5
01PA01-18 28 0.92 2.6
01PA01-18 35 1.82 3.7
01PA01-18 42 2.6 4.8
01PA01-18 49 3.62 5.9
01PA01-18 56 4.64 7
01PA01-18 63 5.54 8.1
01PA01-18 66 6.24 8.1
01PA01-18 73 7.25 9.2
01PA02-18 7 0 0.21
01PA02-18 15 0.59 0.77
01PA02-18 22 1.24 1.5
01PA02-18 28 0.87 2.6
01PA02-18 35 1.8 3.7
01PA02-18 42 2.4 4.8
01PA02-18 49 3.51 5.9
01PA02-18 56 4.6 7
01PA02-18 63 5.51 8.1
01PA02-18 66 6.53 8.1
01PA02-18 73 7.42 9.2
01PA03-18 14 0.53 0.77
01PA03-18 21 1.14 1.5
01PA03-18 27 0.91 1.5
01PA03-18 34 1.67 2.6
01PA03-18 41 2.2 3.7
01PA03-18 48 3.24 4.8
01PA03-18 55 4.31 5.9
01PA03-18 62 4.94 7
01PA03-18 65 5.44 8.1
01PA03-18 72 6.41 9.2
01PA04-18 14 0.53 0.77
01PA04-18 21 1.14 1.5
01PA04-18 27 0.9 1.5
01PA04-18 34 1.52 2.6
01PA04-18 41 1.9 3.7
01PA04-18 48 2.6 4.8
01PA04-18 55 3.52 5.9
01PA04-18 62 4.21 7
01PA04-18 65 4.82 8.1
01PA04-18 72 5.87 9.2
01PA05-18 14 0.53 0.77
01PA05-18 21 1.14 1.5
01PA05-18 27 0.92 1.5
01PA05-18 34 1.49 2.6
01PA05-18 41 1.91 3.7
01PA05-18 48 2.64 4.8
01PA05-18 55 3.69 5.9
01PA05-18 62 4.19 7
01PA05-18 65 4.72 8.1
01PA05-18 72 5.74 9.2
01PA06-18 13 0.48 0.21
01PA06-18 20 1.04 0.77
01PA06-18 26 0.74 1.5
01PA06-18 33 1.25 2.6
01PA06-18 40 1.82 3.7
01PA06-18 47 3.12 4.8
01PA06-18 54 4.4 5.9
01PA06-18 61 5.44 7
01PA06-18 64 6.46 8.1
01PA06-18 71 7.3 9.2
01PA07-18 13 0.48 0.21
01PA07-18 20 1.04 0.77
01PA07-18 26 0.72 1.5
01PA07-18 33 1.32 2.6
01PA07-18 40 1.84 3.7
01PA07-18 47 3.05 4.8
01PA07-18 54 4.12 5.9
01PA07-18 61 5.21 7
01PA07-18 64 6 8.1
01PA07-18 71 6.9 9.2
01PA08-18 13 0.48 0.21
01PA08-18 20 1.04 0.77
01PA08-18 26 0.7 1.5
01PA08-18 33 1.3 2.6
01PA08-18 40 1.8 3.7
01PA08-18 47 3.07 4.8
01PA08-18 54 3.72 5.9
01PA08-18 61 4.52 7
01PA08-18 64 5.11 8.1
01PA08-18 71 5.87 9.2
01PA09-18 13 0.48 0.21
01PA09-18 20 1.04 0.77
01PA09-18 26 0.71 1.5
01PA09-18 33 1.22 2.6
01PA09-18 40 1.85 3.7
01PA09-18 47 2.9 4.8
01PA09-18 54 3.74 5.9
01PA09-18 61 4.4 7
01PA09-18 64 4.92 8.1
01PA09-18 71 5.78 9.2
01PB01-19 8 0 0.21
01PB01-19 15 0 0.77
01PB01-19 23 0.94 1.5
01PB01-19 30 1.85 2.6
01PB01-19 36 2.5 3.7
01PB01-19 43 3.1 4.8
01PB01-19 50 3.74 5.9
01PB01-19 57 5.05 7
01PB01-19 64 6.18 8.1
01PB01-19 71 7.03 9.2
01PB01-19 74 7.87 9.2
01PB01-19 81 8.41 10.3
01PB02-19 8 0 0.21
01PB02-19 15 0 0.77
01PB02-19 23 0.98 1.5
01PB02-19 30 1.82 2.6
01PB02-19 36 2.6 3.7
01PB02-19 43 3.4 4.8
01PB02-19 50 4 5.9
01PB02-19 57 5.5 7
01PB02-19 64 6.72 8.1
01PB02-19 71 7.5 9.2
01PB02-19 74 8.43 9.2
01PB02-19 81 9.6 10.3
01PB03-19 8 0 0.21
01PB03-19 15 0 0.77
01PB03-19 23 0.92 1.5
01PB03-19 30 1.88 2.6
01PB03-19 36 2.51 3.7
01PB03-19 43 3 4.8
01PB03-19 50 3.4 5.9
01PB03-19 57 5.03 7
01PB03-19 64 6.27 8.1
01PB03-19 71 7.32 9.2
01PB03-19 74 8.2 9.2
01PB03-19 81 9.6 10.3
01PB04-19 13 0 0.21
01PB04-19 21 1.14 1.5
01PB04-19 28 0.93 2.6
01PB04-19 34 1.3 2.6
01PB04-19 41 2.1 3.7
01PB04-19 48 2.9 4.8
01PB04-19 55 3.7 5.9
01PB04-19 62 4.49 7
01PB04-19 69 5.3 8.1
01PB04-19 72 6.08 9.2
01PB04-19 79 7.55 10.3
01PB05-19 13 0 0.21
01PB05-19 21 1.14 1.5
01PB05-19 28 0.83 2.6
01PB05-19 34 1.41 2.6
01PB05-19 41 1.9 3.7
01PB05-19 48 2.6 4.8
01PB05-19 55 3.37 5.9
01PB05-19 62 4.32 7
01PB05-19 69 5.03 8.1
01PB05-19 72 5.84 9.2
01PB05-19 79 6.9 10.3
01PB06-19 13 0 0.21
01PB06-19 21 1.14 1.5
01PB06-19 28 0.86 2.6
01PB06-19 34 1.4 2.6
01PB06-19 41 2.2 3.7
01PB06-19 48 2.9 4.8
01PB06-19 55 3.5 5.9
01PB06-19 62 4.61 7
01PB06-19 69 5.3 8.1
01PB06-19 72 6.18 9.2
01PB06-19 79 7.06 10.3
01PB07-19 12 0 0.21
01PB07-19 20 1.04 0.77
01PB07-19 27 0.85 1.5
01PB07-19 33 1.06 2.6
01PB07-19 40 1.96 3.7
01PB07-19 47 2.6 4.8
01PB07-19 54 3.45 5.9
01PB07-19 61 4.23 7
01PB07-19 68 5.04 8.1
01PB07-19 71 5.85 9.2
01PB07-19 78 6.7 10.3
01PB08-19 12 0 0.21
01PB08-19 20 1.04 0.77
01PB08-19 27 0.85 1.5
01PB08-19 33 1.2 2.6
01PB08-19 40 1.9 3.7
01PB08-19 47 2.7 4.8
01PB08-19 54 3.62 5.9
01PB08-19 61 4.49 7
01PB08-19 68 5.13 8.1
01PB08-19 71 6 9.2
01PB08-19 78 6.9 10.3
01PB09-19 12 0 0.21
01PB09-19 20 1.04 0.77
01PB09-19 27 0.78 1.5
01PB09-19 33 1.4 2.6
01PB09-19 40 2 3.7
01PB09-19 47 2.7 4.8
01PB09-19 54 3.86 5.9
01PB09-19 61 5.47 7
01PB09-19 68 6.03 8.1
01PB09-19 71 6.9 9.2
01PB09-19 78 7.5 10.3
01PC01-19 8 0 0.21
01PC01-19 15 0 0.77
01PC01-19 23 1.34 1.5
01PC01-19 30 1.77 2.6
01PC01-19 36 2.1 3.7
01PC01-19 43 3.2 4.8
01PC01-19 50 3.7 5.9
01PC01-19 57 4.6 7
01PC01-19 64 5.5 8.1
01PC01-19 71 6 9.2
01PC01-19 74 7 9.2
01PC01-19 81 7.4 10.3
01PC02-19 7 0 0.21
01PC02-19 14 0 0.77
01PC02-19 22 1.24 1.5
01PC02-19 29 1.56 2.6
01PC02-19 35 2.4 3.7
01PC02-19 42 3.1 4.8
01PC02-19 49 3.5 5.9
01PC02-19 56 4.34 7
01PC02-19 63 5.3 8.1
01PC02-19 70 6.2 9.2
01PC02-19 73 7 9.2
01PC02-19 80 7.85 10.3
01PC03-19 7 0 0.21
01PC03-19 14 0 0.77
01PC03-19 22 1.24 1.5
01PC03-19 29 1.62 2.6
01PC03-19 35 2.2 3.7
01PC03-19 42 2.6 4.8
01PC03-19 49 3.1 5.9
01PC03-19 56 4.1 7
01PC03-19 63 5 8.1
01PC03-19 70 5.9 9.2
01PC03-19 73 6.5 9.2
01PC03-19 80 7.6 10.3
01PC04-20 13 0 0.21
01PC04-20 21 1.14 1.5
01PC04-20 28 0.81 2.6
01PC04-20 34 1.5 2.6
01PC04-20 41 2.2 3.7
01PC04-20 48 2.9 4.8
01PC04-20 55 3.4 5.9
01PC04-20 62 4.5 7
01PC04-20 69 5 8.1
01PC04-20 72 6 9.2
01PC04-20 79 6.9 10.3
01PC05-19 13 0 0.21
01PC05-19 21 1.14 1.5
01PC05-19 28 0.88 2.6
01PC05-19 34 1.22 2.6
01PC05-19 41 2 3.7
01PC05-19 48 2.54 4.8
01PC05-19 55 3.1 5.9
01PC05-19 62 4.2 7
01PC05-19 69 4.6 8.1
01PC05-19 72 5.5 9.2
01PC05-19 79 6.2 10.3
01PC06-19 11 0 0.21
01PC06-19 19 0.94 0.77
01PC06-19 26 0.85 1.5
01PC06-19 32 1.05 2.6
01PC06-19 39 2.3 3.7
01PC06-19 46 2.9 4.8
01PC06-19 53 3.8 5.9
01PC06-19 60 4.3 7
01PC06-19 67 5 8.1
01PC06-19 70 5.8 9.2
01PC06-19 77 6.8 10.3
01PC07-19 11 0 0.21
01PC07-19 19 0.94 0.77
01PC07-19 26 0.79 1.5
01PC07-19 32 1.4 2.6
01PC07-19 39 1.98 3.7
01PC07-19 46 2.7 4.8
01PC07-19 53 3 5.9
01PC07-19 60 3.9 7
01PC07-19 67 5 8.1
01PC07-19 70 5.6 9.2
01PC07-19 77 6.14 10.3
01PC08-19 11 0 0.21
01PC08-19 19 0.94 0.77
01PC08-19 26 0.9 1.5
01PC08-19 32 1.2 2.6
01PC08-19 39 2 3.7
01PC08-19 46 2.5 4.8
01PC08-19 53 3 5.9
01PC08-19 60 4.1 7
01PC08-19 67 4.91 8.1
01PC08-19 70 5.5 9.2
01PC08-19 77 6 10.3
01PC09-20 11 0 0.21
01PC09-20 19 0.94 0.77
01PC09-20 26 0.8 1.5
01PC09-20 32 1.2 2.6
01PC09-20 39 1.95 3.7
01PC09-20 46 2.65 4.8
01PC09-20 53 3 5.9
01PC09-20 60 4.18 7
01PC09-20 67 5 8.1
01PC09-20 70 5.8 9.2
01PC09-20 77 6.4 10.3
01PD01-09 10 0 0.21
01PD01-09 18 0.84 0.77
01PD01-09 25 0.78 1.5
01PD01-09 31 1.02 2.6
01PD01-09 38 1.92 3.7
01PD01-09 45 2.52 4.8
01PD01-09 52 3.4 5.9
01PD01-09 59 4.11 7
01PD01-09 66 5.03 8.1
01PD01-09 69 5.7 8.1
01PD01-09 76 6.7 9.2
01PD02-09 10 0 0.21
01PD02-09 18 0.84 0.77
01PD02-09 25 0.8 1.5
01PD02-09 31 1.03 2.6
01PD02-09 38 1.88 3.7
01PD02-09 45 2.47 4.8
01PD02-09 52 3.33 5.9
01PD02-09 59 4.04 7
01PD02-09 66 4.85 8.1
01PD02-09 69 5.6 8.1
01PD02-09 76 6.45 9.2
01PD03-09 10 0 0.21
01PD03-09 18 0.84 0.77
01PD03-09 25 0.81 1.5
01PD03-09 31 0.99 2.6
01PD03-09 38 1.8 3.7
01PD03-09 45 2.45 4.8
01PD03-09 52 3.14 5.9
01PD03-09 59 4.01 7
01PD03-09 66 4.91 8.1
01PD03-09 69 5.5 8.1
01PD03-09 76 6.5 9.2
01PD04-09 8 0 0.21
01PD04-09 16 0.64 0.77
01PD04-09 23 0.67 1.5
01PD04-09 29 0.96 2.6
01PD04-09 36 1.9 3.7
01PD04-09 43 2.53 4.8
01PD04-09 50 3.26 5.9
01PD04-09 57 4.38 7
01PD04-09 64 5.42 8.1
01PD04-09 67 6.03 8.1
01PD04-09 74 6.6 9.2
01PD05-09 8 0 0.21
01PD05-09 16 0.64 0.77
01PD05-09 23 0.7 1.5
01PD05-09 29 1.02 2.6
01PD05-09 36 2.07 3.7
01PD05-09 43 2.72 4.8
01PD05-09 50 3.6 5.9
01PD05-09 57 4.56 7
01PD05-09 64 5.52 8.1
01PD05-09 67 6.2 8.1
01PD05-09 74 6.9 9.2
01PD08-09 8 0 0.21
01PD08-09 16 0.64 0.77
01PD08-09 23 0.86 1.5
01PD08-09 29 1.34 2.6
01PD08-09 36 2.23 3.7
01PD08-09 43 2.77 4.8
01PD08-09 50 3.79 5.9
01PD08-09 57 4.59 7
01PD08-09 64 5.62 8.1
01PD08-09 67 5.97 8.1
01PD08-09 74 7 9.2
01PD09-09 8 0 0.21
01PD09-09 16 0.64 0.77
01PD09-09 23 0.82 1.5
01PD09-09 29 1.34 2.6
01PD09-09 36 2.35 3.7
01PD09-09 43 2.79 4.8
01PD09-09 50 3.82 5.9
01PD09-09 57 4.64 7
01PD09-09 64 5.65 8.1
01PD09-09 67 6.04 8.1
01PD09-09 74 7.04 9.2
01PD10-10 14 0.53 0.77
01PD10-10 21 1.14 1.5
01PD10-10 27 0.89 1.5
01PD10-10 34 1.69 2.6
01PD10-10 41 2.31 3.7
01PD10-10 48 3.14 4.8
01PD10-10 55 4.2 5.9
01PD10-10 62 5.22 7
01PD10-10 65 5.82 8.1
01PD10-10 72 6.84 9.2
03PA01-17 11 0.37 0.21
03PA01-17 18 0.84 0.77
03PA01-17 24 0.75 1.5
03PA01-17 31 1.65 2.6
03PA01-17 38 2.5 3.7
03PA01-17 45 3.45 4.8
03PA01-17 52 4.1 5.9
03PA01-17 59 4.56 7
03PA01-17 62 4.8 7
03PA01-17 69 5.6 8.1
03PA02-17 11 0.37 0.21
03PA02-17 18 0.84 0.77
03PA02-17 24 0.55 1.5
03PA02-17 31 1.5 2.6
03PA02-17 38 2.3 3.7
03PA02-17 45 3.3 4.8
03PA02-17 52 4.4 5.9
03PA02-17 59 5.06 7
03PA02-17 62 5.5 7
03PA02-17 69 6.4 8.1
03PA03-17 11 0.37 0.21
03PA03-17 18 0.84 0.77
03PA03-17 24 0.65 1.5
03PA03-17 31 1.7 2.6
03PA03-17 38 2.16 3.7
03PA03-17 45 3.1 4.8
03PA03-17 52 4.3 5.9
03PA03-17 59 6.14 7
03PA03-17 62 6.5 7
03PA03-17 69 7.3 8.1
03PA04-16 11 0.37 0.21
03PA04-16 18 0.84 0.77
03PA04-16 24 0.45 1.5
03PA04-16 31 1.4 2.6
03PA04-16 38 2.1 3.7
03PA04-16 45 2.95 4.8
03PA04-16 52 4 5.9
03PA04-16 59 4.23 7
03PA04-16 62 4.7 7
03PA04-16 69 5.6 8.1
03PA05-16 9 0.26 0.21
03PA05-16 16 0.64 0.77
03PA05-16 22 1.34 1.5
03PA05-16 29 1.35 2.6
03PA05-16 36 2.2 3.7
03PA05-16 43 3.15 4.8
03PA05-16 50 3.9 5.9
03PA05-16 57 4.46 7
03PA05-16 60 4.8 7
03PA05-16 67 5.8 8.1
03PA06-16 7 0.19 0.21
03PA06-16 14 0.53 0.77
03PA06-16 20 1.14 0.77
03PA06-16 27 0.65 1.5
03PA06-16 34 1.4 2.6
03PA06-16 41 2.6 3.7
03PA06-16 48 3.7 4.8
03PA06-16 55 4.44 5.9
03PA06-16 58 4.85 7
03PA06-16 65 6 8.1
03PA07-16 8 0.22 0.21
03PA07-16 14 0.59 0.77
03PA07-16 21 0.55 1.5
03PA07-16 28 1.25 2.6
03PA07-16 35 2.4 3.7
03PA07-16 42 3.5 4.8
03PA07-16 49 4.18 5.9
03PA07-16 52 4.55 5.9
03PA07-16 59 5.7 7
03PA08-17 8 0.22 0.21
03PA08-17 14 0.59 0.77
03PA08-17 21 0.68 1.5
03PA08-17 28 1.5 2.6
03PA08-17 35 2.65 3.7
03PA08-17 42 3.9 4.8
03PA08-17 49 5.3 5.9
03PA08-17 52 5.8 5.9
03PA08-17 59 7.6 7
03PB02-16 7 0.19 0.21
03PB02-16 14 0.53 0.77
03PB02-16 20 1.14 0.77
03PB02-16 27 0.7 1.5
03PB02-16 34 1.6 2.6
03PB02-16 41 2.6 3.7
03PB02-16 48 3 4.8
03PB02-16 55 4.22 5.9
03PB02-16 58 4.65 7
03PB02-16 65 5.8 8.1
03PB05-16 13 0.48 0.21
03PB05-16 19 1.04 0.77
03PB05-16 26 0.9 1.5
03PB05-16 33 1.5 2.6
03PB05-16 40 2.5 3.7
03PB05-16 47 3.1 4.8
03PB05-16 54 3.78 5.9
03PB05-16 57 4.45 7
03PB05-16 64 5.6 8.1
03PB06-16 13 0.48 0.21
03PB06-16 19 1.04 0.77
03PB06-16 26 0.9 1.5
03PB06-16 33 1.7 2.6
03PB06-16 40 2.5 3.7
03PB06-16 47 3 4.8
03PB06-16 54 3.47 5.9
03PB06-16 57 4.1 7
03PB06-16 64 5 8.1
03PB07-16 13 0.48 0.21
03PB07-16 19 1.04 0.77
03PB07-16 26 0.7 1.5
03PB07-16 33 1.6 2.6
03PB07-16 40 2.4 3.7
03PB07-16 47 3 4.8
03PB07-16 54 3.5 5.9
03PB07-16 57 4 7
03PB07-16 64 4.8 8.1
03PB08-15 12 0.42 0.21
03PB08-15 18 0.94 0.77
03PB08-15 25 0.9 1.5
03PB08-15 32 1.5 2.6
03PB08-15 39 2.6 3.7
03PB08-15 46 3.1 4.8
03PB08-15 53 5.66 5.9
03PB08-15 56 6.1 7
03PB08-15 63 7 8.1
03PC01-16 7 0.22 0.21
03PC01-16 10 0.37 0.21
03PC01-16 17 0.84 0.77
03PC02-16 12 0.42 0.21
03PC02-16 18 0.94 0.77
03PC02-16 25 1.01 1.5
03PC02-16 32 1.73 2.6
03PC02-16 39 2.59 3.7
03PC02-16 46 3.25 4.8
03PC02-16 53 3.82 5.9
03PC02-16 56 4.15 7
03PC02-16 63 5.33 8.1
03PC03-16 9 0.26 0.21
03PC03-16 15 0.64 0.77
03PC03-16 22 1.01 1.5
03PC03-16 29 1.84 2.6
03PC03-16 36 2.31 3.7
03PC03-16 43 3.32 4.8
03PC03-16 50 4.77 5.9
03PC03-16 53 5.1 5.9
03PC03-16 60 5.57 7
03PC04-15 9 0.26 0.21
03PC04-15 15 0.64 0.77
03PC04-15 22 0.99 1.5
03PC04-15 29 1.83 2.6
03PC04-15 36 2.25 3.7
03PC04-15 43 3.23 4.8
03PC04-15 50 4.82 5.9
03PC04-15 53 5.2 5.9
03PC04-15 60 5.64 7
03PC05-15 11 0.42 0.21
03PC05-15 18 0.94 0.77
03PC05-15 25 0.83 1.5
03PC05-15 32 1.5 2.6
03PC05-15 39 2.28 3.7
03PC05-15 46 2.92 4.8
03PC05-15 49 3.3 5.9
03PC05-15 56 3.55 7
03PC06-16 11 0.42 0.21
03PC06-16 18 0.94 0.77
03PC06-16 25 0.84 1.5
03PC06-16 32 1.53 2.6
03PC06-16 39 2.69 3.7
03PC06-16 46 3.82 4.8
03PC06-16 49 4.3 5.9
03PC06-16 56 5.37 7
03PC07-15 12 0.42 0.21
03PC07-15 18 0.94 0.77
03PC07-15 25 0.99 1.5
03PC07-15 32 1.82 2.6
03PC07-15 39 2.65 3.7
03PC07-15 46 3.04 4.8
03PC07-15 53 3.45 5.9
03PC07-15 56 3.9 7
03PC07-15 63 4.77 8.1
03PC08-14 11 0.37 0.21
03PC08-14 17 0.84 0.77
03PC08-14 24 0.99 1.5
03PC08-14 31 1.75 2.6
03PC08-14 38 2.45 3.7
03PC08-14 45 3.07 4.8
03PC08-14 52 3.45 5.9
03PC08-14 55 3.95 5.9
03PC08-14 62 4.72 7
03PD01-14 7 0.19 0.21
03PD01-14 13 0.53 0.21
03PD01-14 20 1.14 0.77
03PD01-14 27 0.7 1.5
03PD01-14 34 1.75 2.6
03PD01-14 41 2.64 3.7
03PD01-14 48 3.49 4.8
03PD01-14 51 4.2 5.9
03PD01-14 58 5.2 7
03PD02-14 7 0.19 0.21
03PD02-14 13 0.53 0.21
03PD02-14 20 1.14 0.77
03PD02-14 27 0.85 1.5
03PD02-14 34 1.85 2.6
03PD02-14 41 2.85 3.7
03PD02-14 48 5.35 4.8
03PD02-14 51 5.5 5.9
03PD02-14 58 6.5 7
03PD03-14 11 0.37 0.21
03PD03-14 17 0.84 0.77
03PD03-14 24 0.78 1.5
03PD03-14 31 1.78 2.6
03PD03-14 38 2.55 3.7
03PD03-14 45 3.43 4.8
03PD03-14 52 5.2 5.9
03PD03-14 55 5.4 5.9
03PD03-14 62 6.2 7
03PD04-14 9 0.26 0.21
03PD04-14 15 0.64 0.77
03PD04-14 22 0.65 1.5
03PD04-14 29 1.84 2.6
03PD04-14 36 2.62 3.7
03PD04-14 43 3.38 4.8
03PD04-14 50 5.51 5.9
03PD04-14 53 5.85 5.9
03PD04-14 60 6.95 7
03PD05-15 7 0.19 0.21
03PD05-15 13 0.53 0.21
03PD05-15 20 1.14 0.77
03PD05-15 27 0.55 1.5
03PD05-15 34 1.53 2.6
03PD05-15 41 2.7 3.7
03PD05-15 48 3.57 4.8
03PD05-15 51 4.1 5.9
03PD05-15 58 5.1 7
03PD06-14 9 0.26 0.21
03PD06-14 15 0.64 0.77
03PD06-14 22 0.6 1.5
03PD06-14 29 1.7 2.6
03PD06-14 36 2.76 3.7
03PD06-14 43 3.37 4.8
03PD06-14 50 4.36 5.9
03PD06-14 53 4.7 5.9
03PD06-14 60 5.6 7
03PD07-15 7 0.22 0.21
03PD07-15 10 0.37 0.21
03PD07-15 17 0.84 0.77
03PD08-15 9 0.26 0.21
03PD08-15 15 0.64 0.77
03PD08-15 22 0.7 1.5
03PD08-15 29 1.85 2.6
03PD08-15 36 2.65 3.7
03PD08-15 43 3.4 4.8
03PD08-15 50 5.15 5.9
03PD08-15 53 5.6 5.9
03PD08-15 60 6.6 7
05PA05-13 11 0 0.21
05PA05-13 17 0 0.77
05PA05-13 24 0 1.5
05PA05-13 25 0 1.5
05PB01-14 9 0 0.21
05PB01-14 9 0 0.21
05PB01-14 22 1.4 1.5
05PB01-14 30 2.4 2.6
06PA01-13 10 0.37 0.21
06PA01-13 17 0.84 0.77
06PA01-13 24 1.1 1.5
06PA01-13 31 2.3 2.6
06PA01-13 34 3.23 2.6
06PA01-13 41 4.61 3.7
06PA02-14 10 0.37 0.21
06PA02-14 17 0.84 0.77
06PA02-14 24 1 1.5
06PA02-14 31 2.1 2.6
06PA02-14 34 3.23 2.6
06PA02-14 41 4.1 3.7
06PA03-14 12 0.48 0.21
06PA03-14 19 1.04 0.77
06PA03-14 26 0.75 1.5
06PA03-14 29 2 2.6
06PA03-14 36 2.52 3.7
06PA04-13 12 0.48 0.21
06PA04-13 19 1.04 0.77
06PA04-13 26 0.82 1.5
06PA04-13 29 2.08 2.6
06PA04-13 36 2.6 3.7
06PA05-14 11 0.42 0.21
06PA05-14 18 0.94 0.77
06PA05-14 25 0.73 1.5
06PA05-14 28 2.16 2.6
06PA05-14 35 2.4 3.7
06PA06-14 11 0.42 0.21
06PA06-14 18 0.94 0.77
06PA06-14 25 0.81 1.5
06PA06-14 28 2.16 2.6
06PA06-14 35 2.8 3.7
06PA07-14 13 0.53 0.21
06PA07-14 20 1.14 0.77
06PA07-14 27 0.89 1.5
06PA07-14 30 2.09 2.6
06PA07-14 37 2.75 3.7
06PA08-14 13 0.53 0.21
06PA08-14 20 1.14 0.77
06PA08-14 27 0.91 1.5
06PA08-14 30 2.11 2.6
06PA08-14 37 2.82 3.7
06PB01-13 10 0.37 0.21
06PB01-13 17 0.84 0.77
06PB01-13 24 1 1.5
06PB01-13 31 2.2 2.6
06PB01-13 34 3.23 2.6
06PB01-13 41 4.48 3.7
06PB02-13 10 0.37 0.21
06PB02-13 17 0.84 0.77
06PB02-13 24 0.6 1.5
06PB02-13 31 1.61 2.6
06PB02-13 34 3.23 2.6
06PB02-13 41 3.5 3.7
06PB03-13 11 0.42 0.21
06PB03-13 18 0.94 0.77
06PB03-13 25 0.85 1.5
06PB03-13 28 2.16 2.6
06PB03-13 35 3 3.7
06PB04-13 11 0.42 0.21
06PB04-13 18 0.94 0.77
06PB04-13 25 0.73 1.5
06PB04-13 28 2.16 2.6
06PB04-13 35 2.5 3.7
06PB05-13 11 0.42 0.21
06PB05-13 18 0.94 0.77
06PB05-13 25 0.85 1.5
06PB05-13 28 2.3 2.6
06PB05-13 35 3 3.7
06PB06-13 11 0.42 0.21
06PB06-13 18 0.94 0.77
06PB06-13 25 1 1.5
06PB06-13 28 2.16 2.6
06PB06-13 35 2.8 3.7
06PB07-13 13 0.53 0.21
06PB07-13 20 1.14 0.77
06PB07-13 27 0.75 1.5
06PB07-13 30 0.95 2.6
06PB07-13 37 2.5 3.7
06PB08-14 13 0.53 0.21
06PB08-14 20 1.14 0.77
06PB08-14 27 0.9 1.5
06PB08-14 30 1.2 2.6
06PB08-14 37 3.5 3.7
06PC07-13 7 0.22 0.21
06PC07-13 14 0.59 0.77
06PC07-13 21 1.24 1.5
06PC07-13 24 0.88 1.5
06PC07-13 31 2 2.6
06PC08-13 13 0.19 0.21
06PC08-13 20 0.19 0.77
06PC08-13 23 0.19 1.5
I want the data to be like these
+------------+------------+------------+------------+------------+--------+
| 01PA05-18 | 01PA06-18 | 01PA07-18 | 01PA08-18 | 01PA09-18 | Target |
+-----+------+-----+------+-----+------+-----+------+-----+------+--------+
| DOC | ABW | DOC | ABW | DOC | ABW | DOC | ABW | DOC | ABW | ABW |
+-----+------+-----+------+-----+------+-----+------+-----+------+--------+
| 6 | 0 | 5 | 0 | 5 | 0 | 5 | 0 | 5 | 0 | 0.2 |
| 13 | 0.53 | 12 | 0.48 | 12 | 0.48 | 12 | 0.48 | 12 | 0.48 | 0.77 |
| 20 | 1.14 | 19 | 1.04 | 19 | 1.04 | 19 | 1.04 | 19 | 1.04 | 1.5 |
| 27 | 0.92 | 26 | 0.74 | 26 | 0.72 | 26 | 0.7 | 26 | 0.71 | 2.6 |
| 34 | 1.49 | 33 | 1.25 | 33 | 1.32 | 33 | 1.30 | 33 | 1.22 | 3.7 |
| 41 | 1.91 | 40 | 1.82 | 40 | 1.84 | 40 | 1.80 | 40 | 1.85 | 4.8 |
| 48 | 2.64 | 47 | 3.12 | 47 | 3.05 | 47 | 3.07 | 47 | 2.90 | 5.9 |
| 55 | 3.69 | 54 | 4.40 | 54 | 4.12 | 54 | 3.72 | 54 | 3.74 | 7 |
| 62 | 4.19 | 61 | 5.44 | 61 | 5.21 | 61 | 4.52 | 61 | 4.40 | 8.1 |
| 65 | 4.72 | 64 | 6.46 | 64 | 6.00 | 64 | 5.11 | 64 | 4.92 | 9.2 |
| 72 | 5.74 | 71 | 7.30 | 71 | 6.90 | 71 | 5.87 | 71 | 5.78 | 10.3 |
+-----+------+-----+------+-----+------+-----+------+-----+------+--------+
try using case
Case when PondCrop =01PA03-18
then //your code
else //your code
end case as 01PA03-18