Skip to contents

Print the waas 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 waas
print(x, export = FALSE, file.name = NULL, digits = 4, ...)

Arguments

x

An object of class waas.

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.

...

Options used by the tibble package to format the output. See tibble::print() for more details.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
model <- waas(data_ge,
  resp = c(GY, HM),
  gen = GEN,
  env = ENV,
  rep = REP
)
#> variable GY 
#> ---------------------------------------------------------------------------
#> AMMI analysis table
#> ---------------------------------------------------------------------------
#>     Source  Df  Sum Sq Mean Sq F value   Pr(>F) Proportion Accumulated
#>        ENV  13 279.574 21.5057   62.33 0.00e+00         NA          NA
#>   REP(ENV)  28   9.662  0.3451    3.57 3.59e-08         NA          NA
#>        GEN   9  12.995  1.4439   14.93 2.19e-19         NA          NA
#>    GEN:ENV 117  31.220  0.2668    2.76 1.01e-11         NA          NA
#>        PC1  21  10.749  0.5119    5.29 0.00e+00       34.4        34.4
#>        PC2  19   9.924  0.5223    5.40 0.00e+00       31.8        66.2
#>        PC3  17   4.039  0.2376    2.46 1.40e-03       12.9        79.2
#>        PC4  15   3.074  0.2049    2.12 9.60e-03        9.8        89.0
#>        PC5  13   1.446  0.1113    1.15 3.18e-01        4.6        93.6
#>        PC6  11   0.932  0.0848    0.88 5.61e-01        3.0        96.6
#>        PC7   9   0.567  0.0630    0.65 7.53e-01        1.8        98.4
#>        PC8   7   0.362  0.0518    0.54 8.04e-01        1.2        99.6
#>        PC9   5   0.126  0.0252    0.26 9.34e-01        0.4       100.0
#>  Residuals 252  24.367  0.0967      NA       NA         NA          NA
#>      Total 536 389.036  0.7258      NA       NA         NA          NA
#> ---------------------------------------------------------------------------
#> 
#> variable HM 
#> ---------------------------------------------------------------------------
#> AMMI analysis table
#> ---------------------------------------------------------------------------
#>     Source  Df  Sum Sq Mean Sq F value   Pr(>F) Proportion Accumulated
#>        ENV  13 5710.32 439.255   57.22 1.11e-16         NA          NA
#>   REP(ENV)  28  214.93   7.676    2.70 2.20e-05         NA          NA
#>        GEN   9  269.81  29.979   10.56 7.41e-14         NA          NA
#>    GEN:ENV 117 1100.73   9.408    3.31 1.06e-15         NA          NA
#>        PC1  21  381.13  18.149    6.39 0.00e+00       34.6        34.6
#>        PC2  19  319.43  16.812    5.92 0.00e+00       29.0        63.6
#>        PC3  17  114.26   6.721    2.37 2.10e-03       10.4        74.0
#>        PC4  15   81.96   5.464    1.92 2.18e-02        7.4        81.5
#>        PC5  13   68.11   5.240    1.84 3.77e-02        6.2        87.7
#>        PC6  11   59.07   5.370    1.89 4.10e-02        5.4        93.0
#>        PC7   9   46.69   5.188    1.83 6.33e-02        4.2        97.3
#>        PC8   7   26.65   3.808    1.34 2.32e-01        2.4        99.7
#>        PC9   5    3.41   0.682    0.24 9.45e-01        0.3       100.0
#>  Residuals 252  715.69   2.840      NA       NA         NA          NA
#>      Total 536 9112.21  17.000      NA       NA         NA          NA
#> ---------------------------------------------------------------------------
#> 
#> All variables with significant (p < 0.05) genotype-vs-environment interaction
#> Done!
print(model)
#> Variable GY 
#> ---------------------------------------------------------------------------
#> Individual analysis of variance
#> ---------------------------------------------------------------------------
#> NULL
#> ---------------------------------------------------------------------------
#> AMMI analysis table
#> ---------------------------------------------------------------------------
#>       Source  Df     Sum Sq     Mean Sq   F value       Pr(>F) Proportion
#> 1        ENV  13 279.573552 21.50565785 62.325457 0.000000e+00         NA
#> 2   REP(ENV)  28   9.661516  0.34505416  3.568548 3.593191e-08         NA
#> 3        GEN   9  12.995044  1.44389374 14.932741 2.190118e-19         NA
#> 4    GEN:ENV 117  31.219565  0.26683389  2.759595 1.005191e-11         NA
#> 5        PC1  21  10.749140  0.51186000  5.290000 0.000000e+00       34.4
#> 6        PC2  19   9.923920  0.52231000  5.400000 0.000000e+00       31.8
#> 7        PC3  17   4.039180  0.23760000  2.460000 1.400000e-03       12.9
#> 8        PC4  15   3.073770  0.20492000  2.120000 9.600000e-03        9.8
#> 9        PC5  13   1.446440  0.11126000  1.150000 3.176000e-01        4.6
#> 10       PC6  11   0.932240  0.08475000  0.880000 5.606000e-01        3.0
#> 11       PC7   9   0.566700  0.06297000  0.650000 7.535000e-01        1.8
#> 12       PC8   7   0.362320  0.05176000  0.540000 8.037000e-01        1.2
#> 13       PC9   5   0.125860  0.02517000  0.260000 9.345000e-01        0.4
#> 14 Residuals 252  24.366674  0.09669315        NA           NA         NA
#> 15     Total 536 389.035920  0.72581328        NA           NA         NA
#>    Accumulated
#> 1           NA
#> 2           NA
#> 3           NA
#> 4           NA
#> 5         34.4
#> 6         66.2
#> 7         79.2
#> 8         89.0
#> 9         93.6
#> 10        96.6
#> 11        98.4
#> 12        99.6
#> 13       100.0
#> 14          NA
#> 15          NA
#> ---------------------------------------------------------------------------
#> 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 
#> # … with 14 more rows, and 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>
#> ---------------------------------------------------------------------------
#> Some information regarding the analysis
#> ---------------------------------------------------------------------------
#> # A tibble: 14 × 2
#>    Parameters Values             
#>    <chr>      <chr>              
#>  1 Mean       "2.67"             
#>  2 SE         "0.05"             
#>  3 SD         "0.92"             
#>  4 CV         "34.56"            
#>  5 Min        "0.67 (G10 in E11)"
#>  6 Max        "5.09 (G8 in E5)"  
#>  7 MinENV     "E11 (1.37)"       
#>  8 MaxENV     "E3 (4.06)"        
#>  9 MinGEN     "G10 (2.47) "      
#> 10 MaxGEN     "G8 (3) "          
#> 11 wresp      "50"               
#> 12 mresp      "100"              
#> 13 Ngen       "10"               
#> 14 Nenv       "14"               
#> 
#> 
#> 
#> Variable HM 
#> ---------------------------------------------------------------------------
#> Individual analysis of variance
#> ---------------------------------------------------------------------------
#> NULL
#> ---------------------------------------------------------------------------
#> AMMI analysis table
#> ---------------------------------------------------------------------------
#>       Source  Df     Sum Sq    Mean Sq   F value       Pr(>F) Proportion
#> 1        ENV  13 5710.31673 439.255133 57.223777 1.110223e-16         NA
#> 2   REP(ENV)  28  214.93065   7.676095  2.702830 2.196589e-05         NA
#> 3        GEN   9  269.81118  29.979019 10.555915 7.414690e-14         NA
#> 4    GEN:ENV 117 1100.73412   9.407984  3.312646 1.063605e-15         NA
#> 5        PC1  21  381.12827  18.148970  6.390000 0.000000e+00       34.6
#> 6        PC2  19  319.43319  16.812270  5.920000 0.000000e+00       29.0
#> 7        PC3  17  114.26443   6.721440  2.370000 2.100000e-03       10.4
#> 8        PC4  15   81.96192   5.464130  1.920000 2.180000e-02        7.4
#> 9        PC5  13   68.11488   5.239610  1.840000 3.770000e-02        6.2
#> 10       PC6  11   59.07451   5.370410  1.890000 4.100000e-02        5.4
#> 11       PC7   9   46.69408   5.188230  1.830000 6.330000e-02        4.2
#> 12       PC8   7   26.65417   3.807740  1.340000 2.318000e-01        2.4
#> 13       PC9   5    3.40867   0.681730  0.240000 9.445000e-01        0.3
#> 14 Residuals 252  715.68528   2.840021        NA           NA         NA
#> 15     Total 536 9112.21209  17.000396        NA           NA         NA
#>    Accumulated
#> 1           NA
#> 2           NA
#> 3           NA
#> 4           NA
#> 5         34.6
#> 6         63.6
#> 7         74.0
#> 8         81.5
#> 9         87.7
#> 10        93.0
#> 11        97.3
#> 12        99.7
#> 13       100.0
#> 14          NA
#> 15          NA
#> ---------------------------------------------------------------------------
#> 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  
#> # … with 14 more rows, and 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>
#> ---------------------------------------------------------------------------
#> Some information regarding the analysis
#> ---------------------------------------------------------------------------
#> # A tibble: 14 × 2
#>    Parameters Values          
#>    <chr>      <chr>           
#>  1 Mean       "48.09"         
#>  2 SE         "0.21"          
#>  3 SD         "4.37"          
#>  4 CV         "9.09"          
#>  5 Min        "38 (G2 in E14)"
#>  6 Max        "58 (G8 in E11)"
#>  7 MinENV     "E14 (41.03)"   
#>  8 MaxENV     "E11 (54.2)"    
#>  9 MinGEN     "G2 (46.66) "   
#> 10 MaxGEN     "G5 (49.3) "    
#> 11 wresp      "50"            
#> 12 mresp      "100"           
#> 13 Ngen       "10"            
#> 14 Nenv       "14"            
#> 
#> 
#> 
# }