View source: R/export.design.R
export.design | R Documentation |
Function for exporting a design object
export.design(design, response.names = NULL,
path = ".", filename = NULL, legend = NULL, type = "html",
OutDec = options("OutDec")$OutDec, replace = FALSE, version = 2, ...)
html(object, ...)
## S3 method for class 'data.frame'
html(object, file = paste(first.word(deparse(substitute(object))),
"html", sep = "."), append = FALSE, link = NULL, linkCol = 1, bgs.col = NULL,
OutDec=options("OutDec")$OutDec, linkType = c("href", "name"), ...)
design |
A data frame of class design; it must be stored in the global environment and referred to by its name, i.e. it cannot be created “on the fly”. |
response.names |
if not NULL (default), this must be a character vector of response names; the exported file contains a column for each entry; it is NOT necessary to include responses that are already present in the design object! |
path |
the path to the directory where the export files are to be stored;
the default corresponds to the R working directory that can (on some systems)
be looked at using |
filename |
character string that gives the file name (without extension) for the files to be exported; if NULL, it is the name of the design object |
legend |
data frame containing legend information; if NULL,
the legend is automatically generated from the
|
type |
one of |
OutDec |
decimal separator for the output file; one of |
replace |
logical indicating whether an existing file should be replaced; if FALSE (default), the routine aborts without any action if one of the files to be created exists; checking is not case-sensitive in order to protect users on case-insensitive platforms from inadvertent replacing of files (i.e. you cannot have TEST.html and test.html, even if it were allowed on your platform) |
version |
the save version for the |
object |
object to be exported to html |
file |
file to export the object to |
append |
append data frame to existing file ? |
link |
not used, unchanged from package Hmisc |
linkCol |
not used, unchanged from package Hmisc |
bgs.col |
background colors for data frame rows, default white and grey |
linkType |
not used, unchanged from package Hmisc |
... |
further arguments to function |
Function export.design
always stores an R workspace that contains just
the design (with attached attributes, cf. class design
). This file is stored
with ending rda
.
If requested by options type="csv"
, type="html"
, or type="all"
,
export.design
additionally creates an exported version of
the design that is usable outside of R. This is achieved via functions
write.csv
, write.csv2
or html
.
The csv-file contains the data frame itself only, the html file contains the data frame
followed by the legend to the right of the data frame. The html file uses row coloring in
order to prevent mistakes in recording of experimental results by mix-ups of rows.
If the OutDec option is correct for the current computer, the csv and html files can
be opened in Excel, and decimal numbers are correctly interpreted.
Generation of the html-file is particularly important for Taguchi inner/outer array designs in wide format, because it provides the legend to the suffix numbers of response columns in terms of outer array experimental setups!
The function html
and its data frame method are internal.
The functions are used for their side effects and do not generate a result.
This package is currently under intensive development. Substantial changes are to be expected in the near future.
Ulrike Groemping; the html functions have been adapted from package Hmisc
Hedayat, A.S., Sloane, N.J.A. and Stufken, J. (1999) Orthogonal Arrays: Theory and Applications, Springer, New York.
See also FrF2-package
, DoE.wrapper-package
## six 2-level factors
test <- oa.design(nlevels=c(2,3,3,3))
## export an html file with legend and two responses
## files test.rda and test.html will be written to the current working directory,
## if they do not exist yet
## Not run:
export.design(test, response.names=c("pressure", "temperature"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.