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 | B03 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | |||||
1 | B13 | Y | Y | Y | N | Y | N | N | Y | Y | N | N | N | N | N | |||||
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 | B17 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | Y | N | N |
1 | B18 | Y | Y | N | N | N | N | N | N | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y |
1 | BL04 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | |||||
1 | BL05 | Y | N | N | N | Y | N | N | N | N | N | N | N | N | N | |||||
1 | BL06 | Y | N | N | N | N | N | N | N | Y | N | N | Y | N | N | N | Y | Y | N | Y |
1 | BL07 | N | N | Y | N | N | N | N | N | N | Y | N | Y | N | N | N | N | |||
1 | BL08 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
1 | BL18 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | ||
1 | L01 | Y | N | N | N | N | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | N |
1 | L05 | Y | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | Y | Y | N | Y | N |
1 | L16 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
2 | B01 | Y | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
2 | B04 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | |
2 | B19 | Y | Y | Y | Y | Y | Y | Y | N | Y | N | N | Y | N | Y | Y | Y | Y | Y | Y |
2 | B20 | Y | N | N | N | N | N | N | N | N | Y | N | N | Y | Y | N | N | N | N | |
2 | BL12 | Y | N | N | N | N | N | N | N | N | N | N | N | Y | N | Y | N | N | N | N |
2 | BL20 | Y | Y | N | N | N | N | N | Y | Y | N | N | N | N | N | |||||
2 | BL22 | Y | N | N | N | N | N | N | Y | N | Y | N | Y | Y | Y | N | N | N | N | N |
2 | BL23 | Y | N | Y | N | N | N | N | Y | N | N | Y | N | N | N | |||||
2 | BL26 | Y | Y | Y | N | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | N | |
2 | L02 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
2 | L04 | N | N | N | N | N | N | N | N | N | N | N | Y | Y | Y | Y | N | N | N | N |
2 | L07 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
2 | L11 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
2 | L15 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | ||||
2 | L22 | Y | N | N | N | N | Y | N | Y | N | N | N | Y | Y | N | N | N | N | N | |
2 | L25 | Y | N | 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 | B11 | Y | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N |
3 | B23 | Y | Y | Y | N | Y | Y | N | Y | Y | N | N | N | N | N | |||||
3 | BL09 | Y | N | N | N | Y | N | N | N | N | N | N | N | N | N | |||||
3 | BL10 | N | Y | N | N | N | Y | N | Y | Y | Y | Y | N | N | N | N | ||||
3 | BL11 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
3 | BL13 | N | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | Y | Y | Y |
3 | BL17 | Y | Y | N | N | N | N | N | N | Y | Y | N | Y | Y | Y | Y | Y | N | N | N |
3 | BL19 | N | N | N | N | N | Y | N | N | Y | Y | N | N | N | N | N | ||||
3 | BL21 | N | N | N | N | N | Y | N | N | Y | N | N | N | N | N | N | ||||
3 | L06 | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | N | |||||
3 | L12 | Y | N | N | N | N | N | Y | Y | N | N | N | N | N | ||||||
3 | L14 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
3 | L18 | Y | N | N | N | N | N | N | N | Y | Y | Y | N | N | N | N | N | |||
3 | L24 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N | N |
3 | L27 | Y | Y | Y | Y | Y | N | Y | Y | Y | N | N | N | Y | N | |||||
4 | B02 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
4 | B07 | Y | Y | N | N | Y | N | Y | Y | Y | Y | Y | Y | N | N | N | N | N | N | |
4 | B08 | Y | Y | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | |
4 | B09 | N | N | N | N | N | N | N | N | N | N | Y | N | N | N | Y | Y | Y | Y | Y |
4 | B21 | N | N | Y | N | N | N | Y | N | N | Y | Y | N | N | N | N | N | |||
4 | B22 | Y | Y | N | N | Y | N | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N |
4 | B25 | N | Y | N | N | N | N | Y | N | Y | N | N | N | N | N | N | ||||
4 | BL01 | N | N | N | N | N | N | N | N | N | N | Y | Y | N | N | Y | N | N | N | N |
4 | BL15 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||||
4 | BL25 | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | |||||
4 | BL27 | Y | Y | N | N | N | Y | N | N | N | N | N | Y | Y | Y | Y | Y | Y | N | |
4 | L09 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
4 | L13 | N | Y | N | N | N | N | N | Y | Y | Y | Y | N | N | N | N | ||||
4 | L17 | N | N | N | N | N | Y | Y | N | N | N | N | N | |||||||
4 | L21 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
4 | L23 | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | N | |||||
5 | B10 | Y | Y | Y | N | N | N | N | N | N | Y | N | N | Y | Y | Y | Y | Y | Y | Y |
5 | B12 | Y | Y | Y | N | Y | N | Y | Y | Y | N | N | N | |||||||
5 | B16 | Y | N | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | |||
5 | B24 | N | Y | N | N | N | N | Y | N | N | N | N | N | Y | Y | Y | Y | Y | Y | N |
5 | BL02 | Y | N | N | N | N | N | N | N | Y | Y | Y | Y | Y | Y | N | Y | Y | N | Y |
5 | BL03 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
5 | BL14 | Y | Y | N | N | N | N | N | N | N | N | N | N | N | Y | N | N | Y | N | N |
5 | BL16 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N | 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 | L03 | 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 | L10 | Y | Y | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | ||||
5 | L19 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y | N |
5 | L20 | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Y |
5 | L26 | Y | N | N | N | N | N | N | Y | Y | Y | N | N | Y | Y | Y | N | N | N | N |