Learn R Programming

smsets (version 2.0.0)

print.Penrose.dist: Prints Penrose's distance matrix

Description

Prints the results produced by Penrose.dist, the Penrose's distance calculator.

Usage

# S3 method for Penrose.dist
print(x, long = FALSE, ...)

Value

Displays Penrose's distances between m multivariate populations or samples. The argument x, invisibly, as for all print methods, is a list of class "Penrose.dist". This print method provides two sorts of output depending on whether the long argument is TRUE or FALSE (the default). The "short" output displays:

  • A heading describing the function.

  • The data frame analyzed.

  • The variables involved in the calculation of distances.

  • The factor defining the populations or samples and their levels.

  • The Penrose distance matrix (lower triangular form).

In addition to the above information, the "long" output lists:

  • The population or sample sizes.

  • The mean vector for each population / sample.

  • The covariance matrix for each population / sample

  • The pooled covariance matrix.

Arguments

x

an object of class Penrose.dist

long

a logical variable indicating whether a long output is desired (TRUE) or not (FALSE, the default). In addition to Penrose's distances, the long output displays the covariance matrix for each group with their population / sample sizes, the mean vector for each group, and the pooled covariance matrix.

...

further arguments passed to or from other methods.

Examples

Run this code
data(skulls)
res.Penrose <- Penrose.dist(x = skulls, group = Period)
# Long output
print(res.Penrose, long = TRUE)

Run the code above in your browser using DataLab