design.table(design, response=<<see below>>)
design
is used.
d
is a numeric vector whose elements are the number of levels
in each of the factors in the design.
Then the dimension attribute of the array is
d
if there are no
replicated values in the design, or
c(nrep,d)
otherwise, where
nrep
is the maximum number of replications.
The dimnames attribute of the array is the factor names of
design
,
with an initial element of
1:nrep
if there are replications.
Rearranging the response as an array makes more sense
for complete designs.
The function will work fine for fractional designs; the resulting
array will include
NA
s.
Such designs are usually easier to look at just by printing them, but
using
design.table
on them will show you the pattern of missing observations.
If you have some functions that work on arrays with
NA
s,
the value of
design.table
can be used whether the design is complete or not.
Note that this will not work for designs that are severely fractional, such
as many orthogonal array designs, since it will try to create an array that
is too large.