Prints a succession of two dimensional slices of an array.
USAGE:
print.array(x, quote = T)
REQUIRED ARGUMENTS:
x
an array (an object that has a
dim attribute).
OPTIONAL ARGUMENTS:
quote
logical flag: should character strings be surrounded by quotes?
VALUE:
x, with the invisible flag set to prevent reprinting.
SIDE EFFECTS:
print.array uses
print.matrix to print successive
slices from
x.
Both are called from the
print function.
If the
dimnames attribute is present, it is used to title the
matrix sections and to label their rows and columns.
The
digits option is honored in deciding how many significant digits to
print.
SEE ALSO:
,
.
EXAMPLES:
iris[1:5,,1:2]
# this command produces the following output:
, , Setosa
Sepal L. Sepal W. Petal L. Petal W.
[1,] 5.1 3.5 1.4 0.2
[2,] 4.9 3.0 1.4 0.2
[3,] 4.7 3.2 1.3 0.2
[4,] 4.6 3.1 1.5 0.2
[5,] 5.0 3.6 1.4 0.2
, , Versicolor
Sepal L. Sepal W. Petal L. Petal W.
[1,] 7.0 3.2 4.7 1.4
[2,] 6.4 3.2 4.5 1.5
[3,] 6.9 3.1 4.9 1.5
[4,] 5.5 2.3 4.0 1.3
[5,] 6.5 2.8 4.6 1.5