planor2design: Convert matrix, data frame or object of class planordesign to...

View source: R/planor2design.r

planor2designR Documentation

Convert matrix, data frame or object of class planordesign to object of class design

Description

function to convert matrix, data frame or object of class planordesign to class design (allowing use of convenience functions, particularly plotting with mosaic plots)

Usage

data2design(x, quantitative = rep(FALSE, ncol(x)), ...)
planor2design(x, ...)

Arguments

x

an object of class data.frame, matrix (function data2design) or planordesign

quantitative

a logical vector, indicating which factors are quantitative;
defaults to all factors being qualitative

...

currently not used

Details

For matrices and data frames, an unreplicated and unrandomized design is assumed (not crucial, but the some entries of the design.info attribute and the entire run.order attribute of the result will be wrong otherwise). Per default, all factors are treated as qualitative and thus made into factors, if they are not factors already.

Items of the S4 class planordesign are regular factorial designs created by package planor (the designs itself is in the slot design). Function planor2design transforms them into objects of the S3 class design; currently, only the most basic information is included (nunit and the factor information); the design is assumed to be unrandomized and unreplicated.

Value

an object of class design with the type and creator element of design.info given as external or planor. For designs of type planor, the generators element of the design.info attribute contains the designkey from the original planor design.

Author(s)

Ulrike Groemping

See Also

See also: the planordesign class of package planor (if that package is available), design, plot.design


DoE.base documentation built on Nov. 15, 2023, 1:06 a.m.