Learn R Programming

rgr (version 1.1.0)

gx.summary.mat: Displays Summary Statistics for a Matrix or Dataframe

Description

Displays the same concise one-line summary statistics report as gx.summary1 for two or more columns of a matrix or dataframe. The table consists of a heading line and a line of summary statistics for each variable, column of the matrix or dataframe.

Usage

gx.summary.mat(xmat, vars, banner = deparse(substitute(xmat)),
	log = FALSE)

Arguments

xmat
name of the matrix or dataframe.
vars
the indices of the columns of the matrix or dataframe for the variables whose summary statistics are to be displayed.
banner
an informative display title, e.g., banner = "Kola Project, <2 mm="" o-horizon="" soils"<="" code=""> rather than the default variable name of deparse(substitute(xmat).
log
if the summary statistics are required following a log10 transformation, set log = TRUE.

Details

Setting log = TRUE results in a log transformation for the parametric statistical estimates. The maximum, minimum, quartiles and robust estimates of spread are estimated and reported in natural measurement units. Of the parametric statistics, the mean (the geometric mean) and 95%confidence are reported backtransformed into natural measurement units.

See Also

gx.summary1, gx.summary, gx.stats, ltdl.fix.df, remove.na, gx.summary2

Examples

Run this code
## Make test data available
data(kola.o)

## Generates an initial display for As [6], Co [13], Cu [15],
## Ni [24] and Zn [38] 
gx.summary.mat(kola.o, c(6, 13, 15, 24, 38))

## Provide a more informative display for Be [9], La [19], P [25],
## Th [33], U [35] and Y[37]
gx.summary.mat(kola.o, c(9, 19, 25, 33, 35, 37), 
	banner = "Kola Project, <2 mm O-horizon soils")

## As above but with a log10 transformation to display
## the geometric mean, etc.
gx.summary.mat(kola.o, c(9, 19, 25, 33, 35, 37), log = TRUE,
	banner = "Kola Project, <2 mm O-horizon soils")

Run the code above in your browser using DataLab