Skip to contents

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

Arguments

x

An object of class superiority.

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 <- superiority(data_ge2, ENV, GEN, PH)
#> Evaluating trait PH |============================================| 100% 00:00:00 

print(model)
#> Variable PH 
#> ---------------------------------------------------------------------------
#> Superiority index considering all, favorable and unfavorable environments
#> ---------------------------------------------------------------------------
#> # A tibble: 13 × 8
#>    GEN       Y   Pi_a   R_a    Pi_f   R_f   Pi_u   R_u
#>    <chr> <dbl>  <dbl> <dbl>   <dbl> <dbl>  <dbl> <dbl>
#>  1 H1     2.62 0.0258     1 0.0113      8 0.0403     1
#>  2 H10    2.31 0.151     12 0.0213     12 0.280     12
#>  3 H11    2.39 0.116     10 0.0101      7 0.222     11
#>  4 H12    2.44 0.103      8 0.0174     11 0.189      8
#>  5 H13    2.54 0.0688     7 0.00832     4 0.129      7
#>  6 H2     2.60 0.0289     2 0.00839     5 0.0494     2
#>  7 H3     2.59 0.0425     6 0.00791     3 0.0771     4
#>  8 H4     2.58 0.0404     5 0.00279     2 0.0780     5
#>  9 H5     2.57 0.0403     4 0.00253     1 0.0781     6
#> 10 H6     2.56 0.0330     3 0.0128      9 0.0533     3
#> 11 H7     2.40 0.109      9 0.00947     6 0.208      9
#> 12 H8     2.33 0.161     13 0.0165     10 0.306     13
#> 13 H9     2.36 0.124     11 0.0278     13 0.221     10
#> ---------------------------------------------------------------------------
#> 
#> 
#> 
# }