print
Print Data - Generic function
Description
Prints the input.
This function is an S Version 3 generic. (See Methods.)
Method functions can be written to handle specific
S Version 3 classes of data.
Classes that already have methods for this function include:
- aliased
- anova
- aov
- aovlist
- coef
- coxph
- data.frame
- design
- factor
- family
- formula
- gam
- glm
- htest
- listof
- lm
- loess
- mlm
- ms
- nls
- nls.summary
- ordered
- pframe
- preplot.loess
- smooth
- smooth.spline
- specs.loess
- specs.stl
- stl
- summary
- summary.gam
- summary.glm
- summary.loess
- summary.tree
- survdiff
- survfit
- table
- tree
Usage
print(x, ...)
Arguments
x |
any object.
Missing values (NAs) are allowed.
|
... |
most methods have additional arguments such as
digits, which controls how many digits of a number should be printed,
and quote, which controls whether quotes should surround character strings.
|
Details
The print methods for fitted objects,
like those of class "lm",
usually hide the more esoteric parts of the object,
displaying only immediately useful information.
Functions exist to examine some of these esoteric aspects.
For an example, see coefficients.
The standard TIBCO Enterprise Runtime for R session calls
print to print results of function calls,
unless the invisible flag has been set
(see invisible).
The options width
and max.print control line width and maximum number of elements to print.
Value
returns x, with invisible set to prevent
reprinting.
Side Effects
object x is printed in an appropriate format.
See Also
Examples
# In a loop, explicit printing is necessary:
for(i in 1:10) print(i)
# Compare this with:
for(i in 1:10) i
# See the private view of an lm object:
print(unclass(lm(Fuel ~ Weight, data=Sdatasets::fuel.frame)))