print.inference {relevance}R Documentation

Print Tables with Inference Measures

Description

Print methods for objects of class "inference", "termtable", "termeffects", or "printInference".

Usage

## S3 method for class 'inference'
print(x, show = getOption("show.inference"), print=TRUE,
  digits = getOption("digits.reduced"), transpose.ok = TRUE,
  legend = NULL, na.print = getOption("na.print"), ...)

## S3 method for class 'termtable'
print(x, show = getOption("show.inference"), ...)

## S3 method for class 'termeffects'
print(x, show = getOption("show.inference"),
  transpose.ok = TRUE, single = FALSE, print = TRUE, warn = TRUE, ...)

## S3 method for class 'printInference'
print(x, ...)

Arguments

x

object to be printed

show

determines items (columns) to be shown

digits

number of significant digits to be printed

transpose.ok

logical: May a single column be shown as a row?

single

logical: Should components with a single coefficient be printed?

legend

logical: should the legend(s) for the symbols characterizing p-values and relevances be printed? Defaults to regroptions("show.symbolLegend").

na.print

string by which NAs are shown

print

logical: if FALSE, no printing will occur, used to edit the result before printing it.

warn

logical: Should the warning be issued if termeffects has nothing to print since there are no terms with more than one degree of freedom

...

further arguments, passed to print.data.frame().

Details

The value, if assigned to rr, say, can be printed by using print.printInference, writing print(rr), which is just what happens internally unless print=FALSE is used. This allows for editing the result before printing it, see Examples.

printInference objects can be a vector, a data.frame or a matrix, or a list of such items. Each item can have an attribute head of mode character that is printed by cat before the item, and analogous with a tail attribute.

Value

A kind of formatted version of x, with class printInference. For print.inference, it will be a character vector or a data.frame with attributes head and tail if applicable. For print.termeffects, it will be a list of such elements, with its own head and tail. It is invisibly returned.

Author(s)

Werner A. Stahel

See Also

twosamples, termtable, termeffects, inference.

Examples

data(d.blast)
r.blast <-
  lm(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast)
rt <- termtable(r.blast)
## print() : first default, then "classical" :
rt
print(rt, show="classical")

class(te <- termeffects(r.blast)) #  "termeffects"
rr <- print(te, print=FALSE)
attr(rr, "head") <- sub("lm", "Linear Regression", attr(rr, "head"))
class(rr) # "printInference"
rr # <==>  print(rr)

str(rr)

[Package relevance version 2.1 Index]