2.1 Summary of high protein status
2.1.1 By data record (row):
This uses the reportRmd:::rm_covsum() function to summarize Milk data set. However, we know that this data has a nested structure by both cow and yard.
rm_covsum(data = Milk, covs = c("protein", "Time", "Diet"), maincov = "High_Protein", testcat = "Fisher")
Full Sample (n=1337) | N (n=951) | Y (n=386) | p-value | |
---|---|---|---|---|
protein | <0.001 | |||
Mean (sd) | 3.4 (0.3) | 3.3 (0.2) | 3.8 (0.2) | |
Median (Min,Max) | 3.4 (2.5, 4.6) | 3.3 (2.5, 3.6) | 3.8 (3.6, 4.6) | |
Time | 0.035 | |||
Mean (sd) | 9.2 (5.2) | 9.4 (4.9) | 8.7 (5.7) | |
Median (Min,Max) | 9 (1, 19) | 9 (1, 19) | 9 (1, 19) | |
Diet | <0.001 | |||
barley | 425 (32) | 242 (25) | 183 (47) | |
barley+lupins | 459 (34) | 340 (36) | 119 (31) | |
lupins | 453 (34) | 369 (39) | 84 (22) |
2.1.2 By cow in yard at observation instance:
Y denotes high protein milk sample, N denotes non-high protein milk sample.
<- reshape2::dcast(Milk, Yard + Cow ~ Time, value.var="High_Protein");
Milk_t colnames(Milk_t)[-c(1:2)] <- paste("", colnames(Milk_t[, -c(1:2)]), "", sep = "");
options(knitr.kable.NA = '');
::kable(Milk_t); knitr
Yard | Cow | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | B01 | Y | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
1 | B14 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
1 | B15 | Y | Y | N | N | N | Y | N | N | Y | N | N | N | N | N | N | ||||
1 | B20 | Y | N | N | N | N | N | N | N | N | Y | N | N | Y | Y | N | N | N | N | |
1 | B23 | Y | Y | Y | N | Y | Y | N | Y | Y | N | N | N | N | N | |||||
1 | BL02 | Y | N | N | N | N | N | N | N | Y | Y | Y | Y | Y | Y | N | Y | Y | N | Y |
1 | BL05 | Y | N | N | N | Y | N | N | N | N | N | N | N | N | N | |||||
1 | BL07 | N | N | Y | N | N | N | N | N | N | Y | N | Y | N | N | N | N | |||
1 | BL09 | Y | N | N | N | Y | N | N | N | N | N | N | N | N | N | |||||
1 | BL11 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
1 | BL12 | Y | N | N | N | N | N | N | N | N | N | N | N | Y | N | Y | N | N | N | N |
1 | BL17 | Y | Y | N | N | N | N | N | N | Y | Y | N | Y | Y | Y | Y | Y | N | N | N |
1 | BL18 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | ||
1 | BL19 | N | N | N | N | N | Y | N | N | Y | Y | N | N | N | N | N | ||||
1 | BL20 | Y | Y | N | N | N | N | N | Y | Y | N | N | N | N | N | |||||
1 | BL22 | Y | N | N | N | N | N | N | Y | N | Y | N | Y | Y | Y | N | N | N | N | N |
1 | BL27 | Y | Y | N | N | N | Y | N | N | N | N | N | Y | Y | Y | Y | Y | Y | N | |
1 | L15 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | ||||
1 | L27 | Y | Y | Y | Y | Y | N | Y | Y | Y | N | N | N | Y | N | |||||
2 | B07 | Y | Y | N | N | Y | N | Y | Y | Y | Y | Y | Y | N | N | N | N | N | N | |
2 | B12 | Y | Y | Y | N | Y | N | Y | Y | Y | N | N | N | |||||||
2 | BL01 | N | N | N | N | N | N | N | N | N | N | Y | Y | N | N | Y | N | N | N | N |
2 | BL04 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | |||||
2 | BL08 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
2 | BL10 | N | Y | N | N | N | Y | N | Y | Y | Y | Y | N | N | N | N | ||||
2 | L03 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
2 | L06 | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | N | |||||
2 | L16 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
2 | L24 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N | N |
2 | L26 | Y | N | N | N | N | N | N | Y | Y | Y | N | N | Y | Y | Y | N | N | N | N |
3 | B03 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | |||||
3 | B05 | Y | Y | Y | N | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N | N |
3 | B06 | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | |||||
3 | B08 | Y | Y | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |
3 | B09 | N | N | N | N | N | N | N | N | N | N | Y | N | N | N | Y | Y | Y | Y | Y |
3 | B10 | Y | Y | Y | N | N | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | Y |
3 | B11 | Y | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N |
3 | B18 | Y | Y | N | N | N | N | N | N | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y |
3 | B21 | N | N | Y | N | N | N | Y | N | N | Y | Y | N | N | N | N | N | |||
3 | B22 | Y | Y | N | N | Y | N | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N |
3 | BL03 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
3 | BL06 | Y | N | N | N | N | N | N | N | Y | N | N | Y | N | N | N | Y | Y | N | Y |
3 | L09 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
3 | L11 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
3 | L13 | N | Y | N | N | N | N | N | Y | Y | Y | Y | N | N | N | N | ||||
3 | L14 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
3 | L21 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
4 | B02 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
4 | B17 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | Y | N | N |
4 | B24 | N | Y | N | N | N | N | Y | N | N | N | N | N | Y | Y | Y | Y | Y | Y | N |
4 | B25 | N | Y | N | N | N | N | Y | N | Y | N | N | N | N | N | N | ||||
4 | BL21 | N | N | N | N | N | Y | N | N | Y | N | N | N | N | N | N | ||||
4 | L01 | Y | N | N | N | N | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | N |
4 | L05 | Y | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | Y | Y | N | Y | N |
4 | L10 | Y | Y | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | ||||
4 | L18 | Y | N | N | N | N | N | N | N | Y | Y | Y | N | N | N | N | N | |||
4 | L19 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N |
4 | L22 | Y | N | N | N | N | Y | N | Y | N | N | N | Y | Y | N | N | N | N | N | |
5 | B04 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | |
5 | B13 | Y | Y | Y | N | Y | N | N | Y | Y | N | N | N | N | N | |||||
5 | B16 | Y | N | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||
5 | B19 | Y | Y | Y | Y | Y | Y | Y | N | Y | N | N | Y | N | Y | Y | Y | Y | Y | Y |
5 | BL13 | N | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | Y | Y | Y |
5 | BL14 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | Y | N | N | Y | N | N |
5 | BL15 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
5 | BL16 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N | N | N | N |
5 | BL23 | Y | N | Y | N | N | N | N | Y | N | N | Y | N | N | N | |||||
5 | BL24 | Y | N | N | N | N | Y | N | N | N | N | N | N | N | N | N | N | Y | N | N |
5 | BL25 | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | |||||
5 | BL26 | Y | Y | Y | N | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | N | |
5 | L02 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
5 | L04 | N | N | N | N | N | N | N | N | N | N | N | Y | Y | Y | Y | N | N | N | N |
5 | L07 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
5 | L08 | Y | N | N | N | N | N | N | N | N | N | N | Y | N | N | N | N | N | N | |
5 | L12 | Y | N | N | N | N | N | Y | Y | N | N | N | N | N | ||||||
5 | L17 | N | N | N | N | N | Y | Y | N | N | N | N | N | |||||||
5 | L20 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y |
5 | L23 | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | N | |||||
5 | L25 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N |