Skip to contents

summary method for class TD.

Usage

# S3 method for class 'TD'
summary(
  object,
  ...,
  trial = names(object),
  traits,
  groupBy = NULL,
  what = if (!is.null(groupBy)) {
     c("nObs", "mean", "sd")
 } else {
     c("nObs",
    "nMiss", "mean", "median", "min", "max", "firstQ", "thirdQ", "var")
 }
)

Arguments

object

An object of class TD.

...

Further arguments - currently not used.

trial

A character string specifying the trial to be summarized.

traits

A character vector specifying the traits to be summarized.

groupBy

A character string specifying a column in TD by which the summary should be grouped. If NULL, no grouping is done.

what

A character vector indicating which summary statistics should be computed. If what = "all", all available statistics are computed.
Possible options are:

nVals

The number of values, i.e. non-missing + missing values.

nObs

The number of non-missing observations.

nMiss

The number of missing values.

mean

The mean.

median

The median.

min

The minimum.

max

The maximum.

range

The range (maximum - minimum).

firstQ

The first (25pct) quantile.

thirdQ

The third (75pct) quantile.

sd

The standard deviation.

seMean

The standard error of mean.

var

The variance.

seVar

The standard error of variance.

CV

The coefficient of variation.

sum

The sum.

sumSq

The sum of squares.

uncorSumSq

The uncorrected sum of squares.

skew

The skewness.

seSkew

The standard error of the skewness.

kurt

The kurtosis.

seKurt

The standard error of the kurtosis.

all

All summary statistics.

Value

A table containing the selected summary statistics.

See also

Other functions for TD objects: TD, getMeta(), plot.TD()

Examples

## Summarize TDHeat05.
summary(TDHeat05,
        traits = "yield")
#> 
#> Summary statistics for yield in HEAT05  
#> 
#>                             yield
#> Number of observations      338.0
#> Number of missing values      0.0
#> Mean                       184.16
#> Median                     179.81
#> Min                         54.58
#> Max                        341.77
#> First quantile             148.56
#> Third quantile             220.50
#> Variance                 2569.229
#> 

## Summarize TDHeat05 grouping by repId.
summary(TDHeat05,
        traits = "yield",
        groupBy = "repId")
#> 
#> Summary statistics for yield in HEAT05 grouped by repId 
#> 
#>                             1      2
#> Number of observations  169.0  169.0
#> Mean                   208.98 159.34
#> Standard deviation     45.674 42.756
#>