Description Usage Arguments Details Value See Also Examples
reorder.array
reorders an array along a specified
dimension according given names, indices or results of
a function applied.
1 2 3 4 |
x |
An array |
dim |
An integer specifying the dimension along which |
names |
A character vector |
indices |
A numeric vector |
FUN |
A function that can be used in |
... |
further arguments, ignored. |
Typical usages are
1 2 3 4 |
The result of rename(x,dim,names)
is x
reordered such that dimnames(x)[[dim]]
is equal to
the concatenation of those elements of names
that are in dimnames(x)[[dim]]
and the remaining elements
of dimnames(x)[[dim]]
.
The result of rename(x,dim,indices)
is x
reordered along dim
according to indices
.
The result of rename(x,dim,FUN)
is x
reordered along dim
according to order(apply(x,dim,FUN))
.
The reordered object x
.
The default method of reorder
in package stats
.
1 2 3 4 5 |
Loading required package: lattice
Loading required package: MASS
Attaching package: 'memisc'
The following objects are masked from 'package:stats':
contr.sum, contr.treatment, contrasts
The following object is masked from 'package:base':
as.array
a b c d e
A 1.4956787 -2.1806464 -2.39572986 0.3520614 -1.4237890
B 0.1551510 0.7013947 -0.15808608 0.2141887 1.4214606
C 0.8757019 -0.9390429 0.06609669 -1.4306694 2.3288836
D 2.6012038 0.1896782 2.57257207 -0.3290858 -0.7174502
E -0.4526429 -0.4537194 -0.16756315 -2.5305094 0.6259726
a b c d e
E -0.4526429 -0.4537194 -0.16756315 -2.5305094 0.6259726
A 1.4956787 -2.1806464 -2.39572986 0.3520614 -1.4237890
B 0.1551510 0.7013947 -0.15808608 0.2141887 1.4214606
C 0.8757019 -0.9390429 0.06609669 -1.4306694 2.3288836
D 2.6012038 0.1896782 2.57257207 -0.3290858 -0.7174502
c b a d e
A -2.39572986 -2.1806464 1.4956787 0.3520614 -1.4237890
B -0.15808608 0.7013947 0.1551510 0.2141887 1.4214606
C 0.06609669 -0.9390429 0.8757019 -1.4306694 2.3288836
D 2.57257207 0.1896782 2.6012038 -0.3290858 -0.7174502
E -0.16756315 -0.4537194 -0.4526429 -2.5305094 0.6259726
a b c d e
A 1.4956787 -2.1806464 -2.39572986 0.3520614 -1.4237890
E -0.4526429 -0.4537194 -0.16756315 -2.5305094 0.6259726
C 0.8757019 -0.9390429 0.06609669 -1.4306694 2.3288836
B 0.1551510 0.7013947 -0.15808608 0.2141887 1.4214606
D 2.6012038 0.1896782 2.57257207 -0.3290858 -0.7174502
d b c e a
A 0.3520614 -2.1806464 -2.39572986 -1.4237890 1.4956787
B 0.2141887 0.7013947 -0.15808608 1.4214606 0.1551510
C -1.4306694 -0.9390429 0.06609669 2.3288836 0.8757019
D -0.3290858 0.1896782 2.57257207 -0.7174502 2.6012038
E -2.5305094 -0.4537194 -0.16756315 0.6259726 -0.4526429
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.