| cross.design {DoE.base} | R Documentation | 
Function to cross several designs
Description
This function generates cartesian products of two or more experimental designs.
Usage
cross.design(design1, design2, ..., randomize = TRUE, seed=NULL)
Arguments
| design1 |  a data frame of class  if  | 
| design2 |  a data frame of class  | 
| ... |  optional further data frames that are to be crossed; 
they must be of class  | 
| randomize | logical indicating whether randomization should take place after crossing the designs | 
| seed |  integer seed for the random number generator  | 
Details
Crossing is carried out recursively, following the direct.sum approach 
from package conf.design. All but the last designs must fulfill various 
criteria (cf. below). The last design to be crossed can also be a vector. 
Designs to be crossed must not be a blocked, nor splitplot, nor crossed, folded 
or Taguchi parameter design, nor designs in wide format. Furthermore, designs must 
not contain responses (checked via the response.names element of design.info).
If replications are desired, it is recommended to accomodate them in the last 
design. Only the last design may have repeat.only replications. If the 
last design has repeat.only replications and there are also proper replications 
in earlier designs, a warning is thrown, but the repeat.only replications are 
nevertheless accomodated; this is experimental and may not yield the expected 
results under all circumstances.
Value
Function cross.design returns a simple data frame without design 
information, if design1 is not of class design.
Otherwise, the value is a data frame of class design 
with type “crossed” and the following extraordinary elements: 
| cross.nruns | vector of run numbers of individual designs | 
| cross.nfactors | vector of numbers of factors of individual designs | 
| cross.types | vector of types of individual designs | 
| cross.randomize | vector of logicals (randomized or not) of individual desigs | 
| cross.seed | vector of seeds of individual designs | 
| cross.replications | vector of numbers of replications of individual designs | 
| cross.repeat.only | vector of logicals (repeat.only or not) of individual designs | 
| cross.map | list with the map vectors for component designs of type  | 
| cross.selected.columns | 
 | 
| cross.nlevels | list with the  | 
The standard elements are as usual, with randomize and seed referring to 
the randomization within function cross.design itself (previous randomizations are shown 
under cross.randomize and cross.seed). 
The nlevels element of design.info is available only if it is 
available for all designs that have been crossed (otherwise refer to the element cross.nlevels.
The creator element of the design.info attribute consists is a 2-element list 
containing
the list original of all the original creators and 
the element modify that contains the call to cross.design. 
If present, the clear, ncube, ncenter, residual.df, 
origin, comment, generating.oa elements of design.info are vector-valued. 
If present, the generators element of design.info is a list of character vectors. 
If present, the aliased and catlg.entry elements of design.info are lists of lists. 
Warning
Since R version 3.6.0, the behavior of function sample has changed 
(correction of a biased previous behavior that should not be relevant for the randomization of designs). 
For reproducing a randomized design that was produced with an earlier R version, 
please follow the steps described with the argument seed.
Note
This function is still experimental.
Author(s)
Ulrike Groemping
See Also
 See Also param.design 
Examples
   ## creating a Taguchi-style inner-outer array design
   ## with proper randomization
   ##   function param.design would generate such a design with all outer array runs 
   ##     for each inner array run conducted in sequence
   ##   alternatively, a split-plot approach can also handle control and noise factor 
   ##     designs without necessarily crossing two separate designs
   des.control <- oa.design(ID=L18)
   des.noise <- oa.design(ID=L4.2.3,nlevels=2,factor.names=c("N1","N2","N3"))
   crossed <- cross.design(des.control, des.noise)
   crossed
   summary(crossed)