Print the waas_means
object in two ways. By default, the results are shown
in the R console. The results can also be exported to the directory.
Usage
# S3 method for class 'waas_means'
print(x, export = FALSE, file.name = NULL, digits = 4, ...)
Arguments
- x
An object of class
waas_means
.- export
A logical argument. If
TRUE
, a *.txt file is exported to the working directory- file.name
The name of the file if
export = TRUE
- digits
The significant digits to be shown. See
tibble::print()
for more details.- ...
Currently not used.
Author
Tiago Olivoto tiagoolivoto@gmail.com
Examples
# \donttest{
library(metan)
data_means <- mean_by(data_ge, ENV, GEN)
model <- waas_means(data_ge,
env = ENV,
gen = GEN,
resp = everything())
#> Evaluating trait GY |====================== | 50% 00:00:00
Evaluating trait HM |============================================| 100% 00:00:01
print(model)
#> Variable GY
#> ---------------------------------------------------------------------------
#> Weighted average of the absolute scores
#> ---------------------------------------------------------------------------
#> # A tibble: 24 × 22
#> type Code Y PC1 PC2 PC3 PC4 PC5 PC6
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 GEN G1 2.604 0.3166 -0.04417 -0.03600 -0.06595 -0.3125 -0.4272
#> 2 GEN G10 2.471 -1.001 -0.5718 -0.1652 -0.3309 -0.1243 0.1064
#> 3 GEN G2 2.744 0.1390 0.1988 -0.7331 0.4735 -0.04816 0.2841
#> 4 GEN G3 2.955 0.04340 -0.1028 0.2284 0.1769 -0.1270 0.1400
#> 5 GEN G4 2.642 -0.3251 0.4782 -0.09073 0.1417 -0.1924 -0.3550
#> 6 GEN G5 2.537 -0.3260 0.2461 0.2452 0.1794 0.4662 -0.03315
#> 7 GEN G6 2.534 -0.09836 0.2429 0.5607 0.2377 0.05094 0.1011
#> 8 GEN G7 2.741 0.2849 0.5871 -0.2068 -0.7085 0.2315 0.08406
#> 9 GEN G8 3.004 0.4995 -0.1916 0.3191 -0.1676 -0.3261 0.2886
#> 10 GEN G9 2.510 0.4668 -0.8427 -0.1217 0.06385 0.3819 -0.1889
#> # ℹ 14 more rows
#> # ℹ 13 more variables: PC7 <dbl>, PC8 <dbl>, PC9 <dbl>, WAAS <dbl>,
#> # PctResp <dbl>, PctWAAS <dbl>, wRes <dbl>, wWAAS <dbl>, OrResp <dbl>,
#> # OrWAAS <dbl>, OrPC1 <dbl>, WAASY <dbl>, OrWAASY <dbl>
#> ---------------------------------------------------------------------------
#> Genotype-environment interaction effects
#> ---------------------------------------------------------------------------
#> E1 E10 E11 E12 E13 E14 E2 E3
#> G1 -0.08433 0.20299 0.05797 -0.19561 0.15919 -0.178034 -0.06870 0.08657
#> G10 -0.34359 -0.43594 -0.26614 -0.38336 -0.87594 0.280297 0.16890 0.25302
#> G2 0.31116 0.05194 0.05255 0.31492 0.04877 -0.425258 -0.01881 0.43443
#> G3 0.08680 -0.11959 -0.08164 -0.12526 0.27841 -0.003381 0.14722 -0.21310
#> G4 0.10021 0.02447 0.03406 -0.04885 -0.24159 0.111726 0.04245 -0.17767
#> G5 -0.19553 0.10152 0.09430 0.21738 -0.20463 0.139260 0.09707 -0.18610
#> G6 -0.07967 0.17315 0.27261 -0.08263 0.14225 0.157130 0.25143 -0.48946
#> G7 0.18638 0.20002 -0.07060 0.27645 0.20754 0.087732 -0.63395 -0.02967
#> G8 0.04928 0.07026 -0.01423 0.06209 0.28095 -0.119465 -0.06456 -0.28373
#> G9 -0.03071 -0.26883 -0.07888 -0.03513 0.20505 -0.050007 0.07895 0.60572
#> E4 E5 E6 E7 E8 E9
#> G1 -0.1104 0.33060 0.21644 -0.02045 -0.19388 -0.20237
#> G10 0.7987 -0.34181 0.02468 0.45775 0.36696 0.29642
#> G2 -0.0296 -0.15297 -0.19179 -0.07117 -0.56098 0.23683
#> G3 0.1776 -0.06495 0.04040 -0.11145 0.03294 -0.04404
#> G4 -0.3408 -0.09557 0.07030 0.02432 -0.20346 0.70039
#> G5 -0.1593 -0.30460 -0.09300 -0.19523 0.30885 0.37996
#> G6 -0.1316 -0.20136 -0.18745 -0.09090 0.14322 0.12328
#> G7 -0.7230 0.07075 -0.06398 0.49525 -0.01966 0.01673
#> G8 0.1331 0.57220 -0.08449 -0.05651 0.01308 -0.55800
#> G9 0.3851 0.18772 0.26887 -0.43160 0.11293 -0.94922
#> ---------------------------------------------------------------------------
#> Proportion of the variance explained
#> ---------------------------------------------------------------------------
#> [1] 34.4308 31.7875 12.9380 9.8457 4.6331 2.9861 1.8152 1.1605 0.4031
#> ---------------------------------------------------------------------------
#> Cumulative proportion of the variance explained
#> ---------------------------------------------------------------------------
#> [1] 34.43 66.22 79.16 89.00 93.64 96.62 98.44 99.60 100.00
#>
#>
#>
#> Variable HM
#> ---------------------------------------------------------------------------
#> Weighted average of the absolute scores
#> ---------------------------------------------------------------------------
#> # A tibble: 24 × 22
#> type Code Y PC1 PC2 PC3 PC4 PC5 PC6
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 GEN G1 47.08 0.2800 -0.4635 -0.1740 1.369 -1.135 0.03658
#> 2 GEN G10 48.51 -1.779 -1.866 0.006219 -0.9219 0.1096 -0.009745
#> 3 GEN G2 46.66 1.563 -0.5518 0.9357 -0.4913 0.2843 1.184
#> 4 GEN G3 47.60 0.3417 0.2012 0.8001 -0.3753 -0.4979 -1.294
#> 5 GEN G4 48.03 -0.2020 1.841 -0.2801 -0.005954 0.8201 0.2734
#> 6 GEN G5 49.30 1.580 -1.030 -1.078 0.2789 1.005 -0.7368
#> 7 GEN G6 48.73 0.5474 0.2453 -0.5324 -0.4603 -1.008 0.5861
#> 8 GEN G7 47.97 -1.218 0.4680 -1.254 0.05482 -0.03429 0.3366
#> 9 GEN G8 49.10 -0.04176 1.241 0.4105 -0.6394 -0.1785 -0.5149
#> 10 GEN G9 47.90 -1.072 -0.08563 1.166 1.191 0.6351 0.1393
#> # ℹ 14 more rows
#> # ℹ 13 more variables: PC7 <dbl>, PC8 <dbl>, PC9 <dbl>, WAAS <dbl>,
#> # PctResp <dbl>, PctWAAS <dbl>, wRes <dbl>, wWAAS <dbl>, OrResp <dbl>,
#> # OrWAAS <dbl>, OrPC1 <dbl>, WAASY <dbl>, OrWAASY <dbl>
#> ---------------------------------------------------------------------------
#> Genotype-environment interaction effects
#> ---------------------------------------------------------------------------
#> E1 E10 E11 E12 E13 E14 E2 E3 E4
#> G1 0.1169 2.0419 0.8102 1.3285 -1.15148 0.71019 -0.5385 -1.2248 -1.32481
#> G10 -0.9231 -3.0515 -0.6165 0.4685 2.17186 0.78352 0.6049 2.3485 1.58186
#> G2 -0.6598 3.4619 -0.1031 -3.5015 -2.79814 -0.25314 0.7649 -0.1381 -1.57148
#> G3 -1.0472 0.5178 -0.3805 1.5545 0.07448 -0.33052 -1.3192 -1.4155 0.15114
#> G4 0.9314 -2.5770 -0.1420 0.1264 0.01305 0.04138 -0.2940 0.4897 0.05638
#> G5 1.2557 5.4907 -3.5077 -1.6727 -0.10267 -1.00767 1.5537 -0.1093 0.45733
#> G6 0.1885 1.3902 1.4919 0.9769 -2.03648 -1.82481 1.5099 0.1235 0.69019
#> G7 0.1538 -3.1779 0.7738 0.9421 1.46210 3.15710 1.2284 0.8888 -0.21124
#> G8 -0.4658 -1.6474 1.1209 0.0559 1.62590 -1.41243 0.3989 -2.2474 -0.34743
#> G9 0.4497 -2.4486 0.5530 -0.2786 0.74138 0.13638 -3.9090 1.2847 0.51805
#> E5 E6 E7 E8 E9
#> G1 -0.838810 -0.71481 -0.4865 -1.06981 2.3419
#> G10 2.551190 -5.09148 1.0869 -3.82981 1.9152
#> G2 2.981190 0.75519 0.6002 0.70019 -0.2381
#> G3 2.453810 1.29448 -1.0105 0.63948 -1.1822
#> G4 -2.924286 3.43305 0.4780 2.64471 -2.2770
#> G5 -0.006667 -0.39933 -1.7043 -0.70433 0.4573
#> G6 -1.073810 -0.03314 0.3952 -0.15481 -1.6431
#> G7 -2.375238 -0.55124 -1.2562 -0.48957 -0.5446
#> G8 -0.644762 1.84590 0.8242 2.24090 -1.3474
#> G9 -0.122619 -0.53862 1.0730 0.02305 2.5180
#> ---------------------------------------------------------------------------
#> Proportion of the variance explained
#> ---------------------------------------------------------------------------
#> [1] 34.6249 29.0200 10.3807 7.4461 6.1881 5.3668 4.2421 2.4215 0.3097
#> ---------------------------------------------------------------------------
#> Cumulative proportion of the variance explained
#> ---------------------------------------------------------------------------
#> [1] 34.62 63.64 74.03 81.47 87.66 93.03 97.27 99.69 100.00
#>
#>
#>
# }