Skip to contents

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

Arguments

x

An object of class anova_ind.

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 <- data_ge %>% anova_ind(ENV, GEN, REP, c(GY, HM))
#> Evaluating trait GY |======================                      | 50% 00:00:00 
Evaluating trait HM |============================================| 100% 00:00:00 

print(model)
#> Variable GY 
#> ---------------------------------------------------------------------------
#> Within-environment ANOVA results
#> ---------------------------------------------------------------------------
#> # A tibble: 14 × 15
#>    ENV    MEAN   DFG   MSG   FCG       PFG   DFB    MSB    FCB        PFB   DFE
#>    <chr> <dbl> <int> <dbl> <dbl>     <dbl> <int>  <dbl>  <dbl>      <dbl> <int>
#>  1 E1     2.52     9 0.337  2.34 0.0594        2 0.0652  0.453 0.643         18
#>  2 E10    2.18     9 0.296 11.1  0.0000110     2 0.654  24.5   0.00000728    18
#>  3 E11    1.37     9 0.151  1.44 0.244         2 0.377   3.59  0.0486        18
#>  4 E12    1.61     9 0.320  5.98 0.000647      2 0.0919  1.72  0.208         18
#>  5 E13    2.91     9 0.713  7.18 0.000210      2 0.0767  0.772 0.477         18
#>  6 E14    1.78     9 0.131  1.73 0.153         2 0.104   1.37  0.278         18
#>  7 E2     3.18     9 0.207  1.16 0.376         2 0.698   3.91  0.0388        18
#>  8 E3     4.06     9 0.335  1.87 0.123         2 0.489   2.73  0.0921        18
#>  9 E4     3.68     9 0.531  3.86 0.00712       2 0.116   0.846 0.446         18
#> 10 E5     3.91     9 0.526  7.93 0.000110      2 0.219   3.30  0.0602        18
#> 11 E6     2.66     9 0.135  2.30 0.0635        2 0.160   2.73  0.0922        18
#> 12 E7     1.99     9 0.337  3.70 0.00873       2 0.381   4.19  0.0322        18
#> 13 E8     2.54     9 0.215  7.72 0.000131      2 0.817  29.4   0.00000215    18
#> 14 E9     3.06     9 0.679  6.12 0.000562      2 0.583   5.25  0.0160        18
#> # … with 4 more variables: MSE <dbl>, CV <dbl>, h2 <dbl>, AS <dbl>
#> ---------------------------------------------------------------------------
#> 
#> 
#> 
#> Variable HM 
#> ---------------------------------------------------------------------------
#> Within-environment ANOVA results
#> ---------------------------------------------------------------------------
#> # A tibble: 14 × 15
#>    ENV    MEAN   DFG   MSG   FCG     PFG   DFB    MSB    FCB     PFB   DFE   MSE
#>    <chr> <dbl> <int> <dbl> <dbl>   <dbl> <int>  <dbl>  <dbl>   <dbl> <int> <dbl>
#>  1 E1     47.4     9  5.22  2.82 2.93e-2     2  3.11   1.68  2.15e-1    18  1.85
#>  2 E10    44.3     9 28.8  13.2  3.02e-6     2  9.10   4.19  3.22e-2    18  2.17
#>  3 E11    54.2     9  6.06  1.96 1.07e-1     2  2.81   0.910 4.20e-1    18  3.09
#>  4 E12    49.6     9 10.4   1.96 1.08e-1     2  2.77   0.520 6.03e-1    18  5.32
#>  5 E13    46.6     9 13.9  10.3  1.80e-5     2 25.5   19.0   3.71e-5    18  1.34
#>  6 E14    41.0     9  5.28  4.34 3.93e-3     2 10.0    8.23  2.89e-3    18  1.22
#>  7 E2     44.1     9 13.2   4.32 4.02e-3     2  6.70   2.20  1.40e-1    18  3.05
#>  8 E3     52.9     9  8.00  2.88 2.69e-2     2  7.30   2.62  1.00e-1    18  2.78
#>  9 E4     50       9  7.93  6.35 4.51e-4     2  2.10   1.68  2.14e-1    18  1.25
#> 10 E5     52.2     9 11.8   1.86 1.26e-1     2  6.86   1.08  3.62e-1    18  6.37
#> 11 E6     45.9     9 15.8   7.46 1.63e-4     2 12.9    6.06  9.71e-3    18  2.12
#> 12 E7     48.5     9  5.00  1.05 4.38e-1     2  0.705  0.149 8.63e-1    18  4.74
#> 13 E8     45.2     9 11.6   5.34 1.27e-3     2 12.0    5.51  1.36e-2    18  2.17
#> 14 E9     51.3     9  9.33  4.08 5.41e-3     2  5.73   2.50  1.10e-1    18  2.29
#> # … with 3 more variables: CV <dbl>, h2 <dbl>, AS <dbl>
#> ---------------------------------------------------------------------------
#> 
#> 
#> 
# }