Skip to contents

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

Arguments

x

The Schmildt x

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::formatting() for more details.

Author

Tiago Olivoto tiagoolivoto@gmail.com

Examples

# \donttest{
library(metan)
Sch <- Schmildt(data_ge2,
                env = ENV,
                gen = GEN,
                rep = REP,
                resp = PH)
#> Evaluating trait PH |============================================| 100% 00:00:00 

print(Sch)
#> Variable PH 
#> ---------------------------------------------------------------------------
#> Environmental index
#> ---------------------------------------------------------------------------
#> # A tibble: 4 × 4
#>   ENV       Y   index class      
#>   <fct> <dbl>   <dbl> <chr>      
#> 1 A1     2.79  0.308  favorable  
#> 2 A2     2.46 -0.0229 unfavorable
#> 3 A3     2.17 -0.318  unfavorable
#> 4 A4     2.52  0.0329 favorable  
#> ---------------------------------------------------------------------------
#> Analysis for all environments
#> ---------------------------------------------------------------------------
#> # A tibble: 13 × 6
#>    GEN    Mean Mean_rp Sem_rp    Wi  rank
#>    <chr> <dbl>   <dbl>  <dbl> <dbl> <dbl>
#>  1 H1     2.62   106.    4.69  97.9     2
#>  2 H10    2.31    93.0   3.47  87.3    12
#>  3 H11    2.39    96.1   3.14  90.9     9
#>  4 H12    2.44    98.6   5.61  89.3    10
#>  5 H13    2.54   103.    6.19  92.6     7
#>  6 H2     2.60   105.    4.96  96.7     3
#>  7 H3     2.59   104.    5.58  95.0     6
#>  8 H4     2.58   104.    4.38  96.4     5
#>  9 H5     2.57   103.    2.77  98.6     1
#> 10 H6     2.56   103.    3.92  96.5     4
#> 11 H7     2.40    96.8   3.34  91.3     8
#> 12 H8     2.33    93.6   4.81  85.7    13
#> 13 H9     2.36    94.8   3.42  89.2    11
#> ---------------------------------------------------------------------------
#> Analysis for favorable environments
#> ---------------------------------------------------------------------------
#> # A tibble: 13 × 6
#>    GEN       Y Mean_rp Sem_rp    Wi  rank
#>    <chr> <dbl>   <dbl>  <dbl> <dbl> <dbl>
#>  1 H1     2.68   101.   3.60   95.2     9
#>  2 H10    2.59    97.3  2.39   93.3    12
#>  3 H11    2.66   100.   1.70   97.3     7
#>  4 H12    2.61    98.5  2.12   95.0    10
#>  5 H13    2.66   100.   1.15   98.5     6
#>  6 H2     2.66   100.   0.144  99.9     3
#>  7 H3     2.70   101.   3.69   95.3     8
#>  8 H4     2.71   102.   0.593 101.      1
#>  9 H5     2.74   103.   1.64  100.      2
#> 10 H6     2.63    98.9  0.206  98.6     5
#> 11 H7     2.65    99.9  0.574  98.9     4
#> 12 H8     2.62    98.9  2.55   94.7    11
#> 13 H9     2.62    98.1  6.60   87.3    13
#> ---------------------------------------------------------------------------
#> Analysis for unfavorable environments
#> ---------------------------------------------------------------------------
#> # A tibble: 13 × 6
#>    GEN       Y Mean_rp Sem_rp    Wi  rank
#>    <chr> <dbl>   <dbl>  <dbl> <dbl> <dbl>
#>  1 H1     2.56   110.    8.80  95.7     1
#>  2 H10    2.04    88.7   5.41  79.8    11
#>  3 H11    2.12    92.1   4.90  84.0     8
#>  4 H12    2.26    98.6  13.6   76.3    12
#>  5 H13    2.41   105.   14.7   81.0    10
#>  6 H2     2.55   110.   10.1   92.9     3
#>  7 H3     2.49   107.   12.6   86.2     7
#>  8 H4     2.45   105.   10.5   87.8     6
#>  9 H5     2.40   103.    6.59  92.4     4
#> 10 H6     2.49   107.    7.67  94.4     2
#> 11 H7     2.16    93.6   6.85  82.4     9
#> 12 H8     2.03    88.3   8.67  74.0    13
#> 13 H9     2.11    91.5   2.13  88.0     5
#> 
#> 
#> 
# }