Movatterモバイル変換


[0]ホーム

URL:


rdrr.io

summary: Object Summaries

summaryR Documentation

Object Summaries

Description

summary is a generic function used to produce result summariesof the results of various model fitting functions. The functioninvokes particularmethods which depend on theclass of the first argument.

Usage

summary(object, ...)## Default S3 method:summary(object, ..., digits, quantile.type = 7)## S3 method for class 'data.frame'summary(object, maxsum = 7,       digits = max(3, getOption("digits")-3), ...)## S3 method for class 'factor'summary(object, maxsum = 100, ...)## S3 method for class 'matrix'summary(object, ...)## S3 method for class 'summaryDefault'format(x, digits = max(3L, getOption("digits") - 3L), ...) ## S3 method for class 'summaryDefault'print(x, digits = max(3L, getOption("digits") - 3L), ...)

Arguments

object

an object for which a summary is desired.

x

a result of thedefault method ofsummary().

maxsum

integer, indicating how many levels should be shown forfactors.

digits

integer, used for number formatting withsignif() (forsummary.default) orformat() (forsummary.data.frame). Insummary.default, if not specified (i.e.,missing(.)),signif() willnot be calledanymore (sinceR >= 3.4.0, where the default has been changed toonly round in theprint andformat methods).

quantile.type

integer code used inquantile(*, type=quantile.type)for the default method.

...

additional arguments affecting the summary produced.

Details

Forfactors, the frequency of the firstmaxsum - 1most frequent levels is shown, and the less frequent levels aresummarized in"(Others)" (resulting in at mostmaxsumfrequencies).

The functionssummary.lm andsummary.glm are examplesof particular methods which summarize the results produced bylm andglm.

Value

The form of the value returned bysummary depends on theclass of its argument. See the documentation of the particularmethods for details of what is produced by that method.

The default method returns an object of classc("summaryDefault", "table") which has specializedformat andprint methods. Thefactor method returns an integer vector.

The matrix and data frame methods return a matrix of class"table", obtained by applyingsummary to eachcolumn and collating the results.

References

Chambers, J. M. and Hastie, T. J. (1992)Statistical Models in S.Wadsworth & Brooks/Cole.

See Also

anova,summary.glm,summary.lm.

Examples

summary(attenu, digits = 4) #-> summary.data.frame(...), default precisionsummary(attenu $ station, maxsum = 20) #-> summary.factor(...)lst <- unclass(attenu$station) > 20 # logical with NAs## summary.default() for logicals -- different from *.factor:summary(lst)summary(as.factor(lst))

What can we improve?

R Package Documentation

Browse R Packages

We want your feedback!

Note that we can't provide technical support on individual packages. You should contact the package authors for that.

 
Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, readEmbedding Snippets.

Close

[8]ページ先頭

©2009-2026 Movatter.jp