Skip to contents

Print the ammi_indexes object in two ways. By default, the results are shown in the R console. The results can also be exported to the directory into a *.txt file.

Usage

# S3 method for ammi_indexes
print(x, which = "stats", export = FALSE, file.name = NULL, digits = 3, ...)

Arguments

x

An object of class ammi_indexes.

which

Which should be printed. Defaults to "stats". Other possible values are "ranks" for genotype ranking and "ssi" for the simultaneous selection index.

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 <- performs_ammi(data_ge, ENV, GEN, REP, GY) %>%
         ammi_indexes()
#> 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
#> ---------------------------------------------------------------------------
#> 
#> All variables with significant (p < 0.05) genotype-vs-environment interaction
#> Done!
print(model)
#> Variable GY 
#> ---------------------------------------------------------------------------
#> AMMI-based stability indexes
#> ---------------------------------------------------------------------------
#> # A tibble: 10 × 16
#>    GEN       Y  ASTAB ssiASTAB    ASI   ASV AVAMGE    DA    DZ     EV    FA
#>    <chr> <dbl>  <dbl>    <dbl>  <dbl> <dbl>  <dbl> <dbl> <dbl>  <dbl> <dbl>
#>  1 G1     2.60 0.108         8 0.110  0.346   1.32 0.446 0.244 0.0149 0.199
#>  2 G10    2.47 1.47         20 0.389  1.23    5.40 1.62  0.917 0.210  2.63 
#>  3 G2     2.74 0.820        10 0.0792 0.249   2.80 0.979 0.846 0.179  0.959
#>  4 G3     2.96 0.0959        3 0.0359 0.113   1.00 0.339 0.288 0.0207 0.115
#>  5 G4     2.64 0.363         9 0.189  0.594   2.16 0.804 0.457 0.0521 0.646
#>  6 G5     2.54 0.259        10 0.137  0.430   1.88 0.643 0.416 0.0433 0.414
#>  7 G6     2.53 0.440        14 0.0843 0.265   2.28 0.740 0.604 0.0911 0.548
#>  8 G7     2.74 0.971        13 0.211  0.663   3.17 1.16  0.875 0.191  1.34 
#>  9 G8     3.00 0.416         6 0.182  0.574   1.99 0.828 0.517 0.0669 0.686
#> 10 G9     2.51 0.947        17 0.312  0.983   3.68 1.31  0.723 0.131  1.73 
#> # … with 5 more variables: MASI <dbl>, MASV <dbl>, SIPC <dbl>, ZA <dbl>,
#> #   WAAS <dbl>
# }