xDRDN {DiceDesign}R Documentation

Extract a Design and Give it a Range and Dimnames

Description

Extract a design contained in a list (i.e. with a design item), adjust the range, give it dimnames and finally round the values to a certain number of digits. Colnames will look like (A,B,C), (X1,X2,X3), (X01,X02,X03), (X001,X002,X003).

Usage

xDRDN(obj, width = 1, letter = "X", dgts = NULL, range = NULL)

Arguments

obj

a list that contains a design item. Matrix or data.frame are also accepted

width

the digit width in colnames (to write for instance X1, X01, X001). If 0, colnames are filled with capital and small letters (without letters I and i) up to 50 columns

letter

the generic letter used in colnames

dgts

the number of digits to which the design is rounded

range

a vector c(min, max) to adjust the range of the design. The default NULL keeps the original range. Special ranges c(0, 0) and c(1, 1) are not accepted

Value

A rounded matrix or a data.frame with appropriate dimnames and an adjusted range.

Examples

xDRDN(lhsDesign(5, 12))
xDRDN(lhsDesign(5, 12), width = 2, letter = "V", dgts = 2, range = c(-10, 10))
head(xDRDN(olhDesign(50, range = c(1,1)), width = 0, letter = "Z"), 3)
head(xDRDN(olhDesign(51, range = c(1,1)), width = 0, letter = "Z"), 3)

[Package DiceDesign version 1.10 Index]