1
Dear friends, I’m trying to perform a double factor analysis or two-away Anova. I would like to know how to generate the letters of differentiation between treatments for the two factors. This differentiation is common in scientific articles in which it is usually presented in tables, with the minuscule letters differentiating the means in the column and the uppercase letters in the line.
This is done by following the data I used:
data <- structure(list(Parcela = c(1, 8, 14, 19, 2, 9, 15, 17, 3, 10,
13, 18, 4, 6, 12, 20, 5, 7, 11, 16, 40, 35, 29, 23, 39, 34, 30,
25, 38, 32, 26, 21, 37, 33, 28, 22, 36, 31, 27, 24, 41, 47, 51,
59, 42, 55, NA, 60, 43, 48, 52, 57, 44, 46, 54, 58, 45, 50, 53,
56, 80, 71, 67, 62, 79, 73, 68, 64, 78, 72, 69, 61, 77, 74, 70,
63, 76, 75, 66, 65, 81, 90, 93, 99, 82, 86, 91, 96, 83, 89, 92,
97, 84, 88, 95, 100, 85, 87, 94, 98, 120, 114, 106, 102, 119,
111, 110, 101, 118, 115, 109, 103, 117, 113, 108, 105, 116, 112,
107, 104, 121, 128, 134, 136, 122, 129, 131, 137, 123, 127, 132,
140, 124, 126, 135, 139, 125, 130, 133, 138, 160, 155, 146, 143,
159, 154, 148, 142, 158, 152, 150, 145, 157, 153, 147, 141, 156,
151, 149, 144, 161, 170, 174, 176, 162, 168, 172, 180, 163, 167,
171, 178, 164, 169, 175, 179, 165, 166, 173, 177, 201, 206, 212,
219, 202, 207, 215, 217, 203, 209, 211, 218, 204, 210, 213, 216,
205, 208, 214, 220, 240, 234, 227, 222, 239, 235, 228, 224, 238,
232, 230, 225, 237, 233, 229, 223, 236, 231, 226, 221, 241, 246,
254, 260, 242, 247, 251, 256, 243, 250, 255, 257, 244, 248, 253,
259, 245, 249, 252, 258, 280, 275, 267, 263, 279, 274, 269, 265,
278, 273, 270, 264, 277, 272, 268, 262, 276, 271, 266, 261, 281,
286, 294, 299, 282, 289, 295, 297, 283, 287, 292, 300, 284, 288,
291, 298, 285, 290, 293, 296, 320, 314, 307, 301, 319, 313, 308,
305, 318, 311, 309, 302, 317, 315, 306, 304, 316, 312, 310, 303,
321, 327, 335, 337, 322, 326, 332, 340, 323, 328, 333, 336, 324,
330, 334, 338, 325, 329, 331, 339, 360, 355, 346, 341, 359, 354,
349, 345, 358, 351, 348, 344, 357, 353, 350, 342, 356, 352, 347,
343), cul = c("BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO",
"BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO",
"BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO",
"BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO",
"BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO", "BRS 1001IPRO",
"BRS 1001IPRO", "BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO",
"BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO",
"BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO",
"BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO",
"BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO", "BRS 1003IPRO",
"BRS 1003IPRO", "BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO",
"BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO",
"BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO",
"BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO",
"BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO", "BRS 1007IPRO",
"BRS 1007IPRO", "BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO",
"BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO",
"BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO",
"BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO",
"BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO", "BRS 1010IPRO",
"BRS 1010IPRO", "BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO",
"BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO",
"BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO",
"BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO",
"BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO", "BRS 1074IPRO",
"BRS 1074IPRO", "BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR",
"BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR",
"BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR",
"BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR", "BRS 413RR",
"BRS 413RR", "BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR",
"BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR",
"BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR",
"BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR", "BRS 388RR",
"BRS 388RR", "BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR",
"BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR",
"BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR",
"BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR", "BRS 399RR",
"BRS 399RR", "BRB14-211566", "BRB14-211566", "BRB14-211566",
"BRB14-211566", "BRB14-211566", "BRB14-211566", "BRB14-211566",
"BRB14-211566", "BRB14-211566", "BRB14-211566", "BRB14-211566",
"BRB14-211566", "BRB14-211566", "BRB14-211566", "BRB14-211566",
"BRB14-211566", "BRB14-211566", "BRB14-211566", "BRB14-211566",
"BRB14-211566", "BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381",
"BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381",
"BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381",
"BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381", "BR11-3381",
"BR11-3381", "BR12-511", "BR12-511", "BR12-511", "BR12-511",
"BR12-511", "BR12-511", "BR12-511", "BR12-511", "BR12-511", "BR12-511",
"BR12-511", "BR12-511", "BR12-511", "BR12-511", "BR12-511", "BR12-511",
"BR12-511", "BR12-511", "BR12-511", "BR12-511", "BR10-87465",
"BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465",
"BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465",
"BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465",
"BR10-87465", "BR10-87465", "BR10-87465", "BR10-87465", "BRR12-83021",
"BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021",
"BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021",
"BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021",
"BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-83021", "BRR12-53050",
"BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050",
"BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050",
"BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050",
"BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-53050", "BRR12-2497",
"BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497",
"BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497",
"BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497",
"BRR12-2497", "BRR12-2497", "BRR12-2497", "BRR12-2497", "BR12-4929",
"BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929",
"BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929",
"BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929",
"BR12-4929", "BR12-4929", "BR12-4929", "BR12-4929", "BR12-10309",
"BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309",
"BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309",
"BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309",
"BR12-10309", "BR12-10309", "BR12-10309", "BR12-10309"), trat = c("Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.",
"Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Test.", "Test.", "Test.",
"Test.", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)", "Boral 500 SC (1,2)",
"Boral 500 SC (1,2)", "Boral 500 SC (2,4)", "Boral 500 SC (2,4)",
"Boral 500 SC (2,4)", "Boral 500 SC (2,4)", "Sencor 480 (0,75)",
"Sencor 480 (0,75)", "Sencor 480 (0,75)", "Sencor 480 (0,75)",
"Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)", "Sencor 480 (1,5)",
"Test.", "Test.", "Test.", "Test."), rep = c(1, 2, 3, 4, 1, 2,
3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3,
4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 3, 2, 4,
1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1,
2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2,
3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3,
4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,
1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1,
2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2,
3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3,
4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,
1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1,
2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2,
3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3,
4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4,
1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1,
2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4), alt = c(87.4,
95.9, 103.3, 94.2, 94.65, 93.2, 98.95, 87.45, 104.4, 103.4, 102.35,
97.9, 96.7, 101.3, 97.95, 96.3, 102, 98.35, 98.8, 97.4, 64.05,
71.8, 69.7, 65.4, 46.5, 37.15, 40.05, 44.2, 95.6, 92.35, 87.8,
87.3, 93.25, 86.4, 93.4, 79.6, 91.3, 92.35, 90.15, 87.3, 82,
81.15, 75.65, 85.35, 80.35, 75.45, 73.6, 72.9, 95.1, 84.75, 80.6,
86.45, 89.8, 81.7, 81.7, 84.55, 92.65, 88.9, 89.7, 82.35, 81.3,
76.55, 92.7, 79.45, 73.25, 42.6, 72.3, 65.6, 102.15, 97, 102.3,
94.65, 103.4, 94.1, 98.2, 91.65, 104.25, 98.25, 104.05, 100.45,
98.35, 106.4, 101.55, 94.9, 98.2, 103.35, 98.3, 101.8, 107.2,
106.85, 104.45, 97.25, 106.2, 100.3, 99.9, 93, 111.15, 102.2,
107.85, 98.65, 80.15, 75.35, 80.3, 72.5, 73.65, 78.5, 70.7, 76.95,
77.55, 81.45, 80.95, 76.5, 78.25, 77.2, 81.5, 79.35, 82.55, 77.75,
83.05, 79.6, 78.1, 78.8, 85.25, 82.25, 79.05, 76.55, 79, 78.85,
86.6, 75.8, 86.1, 79.35, 77.6, 80.3, 80.4, 69.5, 81.95, 79.1,
81.5, 80.6, 56.35, 71.85, 74.1, 63.2, 44.3, 37.1, 44.25, 37.25,
82.65, 84.85, 78, 95.35, 89.15, 82.05, 90.15, 68.95, 89.85, 80.9,
78.55, 85.7, 71.45, 65.4, 70.05, 71.45, 55.2, 44.7, 59.3, 45.2,
80.75, 78.95, 75.25, 79.7, 81.2, 73.85, 84.15, 72.7, 81.2, 88,
80.05, 71.8, 52.35, 69.5, 56.8, 53.2, 29.2, 41.85, 51.75, 37.35,
65.45, 65.15, 66.5, 49.4, 75.5, 78.5, 67.9, 60.85, 69.15, 66.7,
62.9, 63, 86.5, 106.75, 95.2, 99.75, 76.3, 89.35, 90.75, 87.45,
99.8, 110.3, 98.3, 107.15, 99, 104.25, 95.75, 98.75, 102.15,
106.9, 104.65, 97.5, 91.4, 86.3, 77.6, 87.4, 77.9, 79.5, 86.55,
72.6, 89.25, 93.55, 86.15, 84.2, 81.1, 93.85, 77.4, 85.85, 87.15,
96.45, 78.55, 80.4, 72.1, 70.15, 80.8, 77.15, 54.55, 67.7, 76.65,
70.45, 76.5, 75.4, 80.65, 80.35, 74.3, 75.15, 79.75, 79.9, 76.25,
82.45, 77.85, 85.5, 85.95, 90.4, 94.55, 98.3, 84.9, 84.35, 93.75,
77.7, 92.55, 94.15, 100.05, 102.15, 82.55, 91.65, 96.1, 97.4,
100.3, 97.85, 93.9, 97.3, 93.65, 112.15, 108.2, 111.4, 94.3,
97.95, 107, 98.65, 110.9, 112.85, 111.65, 116.45, 100, 109.3,
109.7, 107.4, 106.55, 113.5, 114, 117.8, 107.4, 114, 112.25,
111, 105.7, 107, 114.9, 115.4, 112.8, 115.65, 113.35, 111.4,
108.5, 112.1, 112.55, 113.5, 116.95, 116.65, 121.05, 119.6, 92.1,
100.15, 100.15, 96.35, 91.2, 104.05, 95.7, 92.9, 104.7, 100.3,
97.8, 99.1, 97.95, 103.85, 100.15, 101.55, 100.55, 100.3, 94.8,
99.1)), .Names = c("Parcela", "cul", "trat", "rep", "alt"), row.names = c(NA,
-340L), class = c("tbl_df", "tbl", "data.frame"))
With this data I performed the following operations:
#setup das variaveis
cul <- as.factor(data$cul)
trat <- as.factor(data$trat)
rep <- as.factor(data$rep)
alt <- data$alt
aovalt <- aov(formula=alt ~ cul+trat+cul:trat, data=data)
model.tables(aovalt, "means")
With the command model.tables
I practically get the table I want to get, but I lack the letters that demonstrate the differences between cultivars and treatments.
For such I tried:
tukey <- TukeyHSD(aovalt)
tukey$`cul:trat`[,4]
plot(tukey$`cul:trat`[,4])
HSD.test(cul, trt = alt)
But as it is possible to observe is generated a gigantic comparison list, this below being only a fraction of the list.
BR12-10309:Boral 500 SC (2,4)-BRR12-2497:Boral 500 SC (1,2)
9.580700e-01
In this sample it is easier to observe the objective of my question: In the first line is the comparison between the cultivar "BR12-10309" treated with "Boral 500 SC (2,4)" compared to the average of the cultivar "BRR12-2497" treated with "Boral 500 SC (1,2)" and the value of p "9.580700e-01" much less than 0.05 or significant, so there is a difference between these averages, my question is how to classify this difference with letters, separating which cultivar got the best average in treatment x,y,z and etc... and within each cultivar what the best treatment to be applied to it.
Thank you all.
The code is not reproducible. The command
data <- data.frame(var,trat,one,two,three)
requires the objectstwo
andthree
that are not defined. To avoid confusion, I suggest editing the question by replacing the entire first block of data creation with the statement of the commanddput(data)
. And if it is possible to rewrite the question, improving the writing with some well-placed commas and shorter sentences (note that there is not a single end point!), I thank you. It will be easier to understand what the doubt actually is.– Marcus Nunes