
Last chance! 50% off unlimited learning
Sale ends in
Function showData allows to view data, function fix allows to edit data. For designs, it is only permitted to type in response data and other additional information like date or comments for experimental runs in R, such that all attributes of the design objects are updated accordingly. However, it is recommended to do such editing tasks outside of R, as R is not ideal for these.
### generic function
fix(x, ...)
# S3 method for default
fix(x, ...)
# S3 method for design
fix(x, ..., prompt=FALSE)
showData(dataframe,colname.bgcolor = "grey50",
rowname.bgcolor = "grey50",
body.bgcolor = "white",
colname.textcolor = "white",
rowname.textcolor = "white",
body.textcolor = "black",
font = "Courier 12",
maxheight = 30,
maxwidth = 80,
title = NULL,
rowname.bar = "left",
colname.bar = "top",
rownumbers = FALSE,
placement = "-20-40",
suppress.X11.warnings = TRUE)
# S3 method for default
showData(dataframe,
colname.bgcolor = "grey50",
rowname.bgcolor = "grey50",
body.bgcolor = "white",
colname.textcolor = "white",
rowname.textcolor = "white",
body.textcolor = "black",
font = "Courier 12",
maxheight = 30,
maxwidth = 80,
title = NULL,
rowname.bar = "left",
colname.bar = "top",
rownumbers = FALSE,
placement = "-20-40",
suppress.X11.warnings = TRUE)
# S3 method for design
showData(dataframe,
colname.bgcolor = "grey50",
rowname.bgcolor = "grey50",
body.bgcolor = "white",
colname.textcolor = "white",
rowname.textcolor = "white",
body.textcolor = "black",
font = "Courier 12",
maxheight = 30,
maxwidth = 80,
title = NULL,
rowname.bar = "left",
colname.bar = "top",
rownumbers = FALSE,
placement = "-20-40",
suppress.X11.warnings = TRUE)
an object of class design
further arguments to function fix
from package utils
logical asking whether user is to be prompted for selecting which new numeric variable is a response; default: all new numeric variables are response variables
data frame; if of S3 class design
, the method for design
is used,
otherwise the default method
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
as documented in relimp
For the default function, refer to fix
and the links therein.
The function for class design
adds the numeric version
(as.numeric
) of all newly-entered variables to the
desnum
attribute of x
and appends the names of all
newly-entered response variables to the
response.names
element of the design.info
attribute.
If numeric variables are to be entered that are no response variables, the
function should be called with prompt=TRUE
so that these are not
taken to be response variables. Automatic default analyses (not yet available) would otherwise
include analyses for these variables.
NOTE: Editing the data in R is only helpful for very small examples, especially when using the default editor under Windows.
NEVER do it to the one and only original data file. It does irrevocably replace it in many cases, even if you realize the mistakes you have made before leaving the editor window.
Function fix
is made into an S3 generic. The default method preserves the
functionality from package utils for all objects that are not of class
design
.
Function fix
immediately commits all changes, overwriting the original object without further notice.
This is also true for the method applicable to objects of class design
, as long as
the changes do not destroy the properties of the design.
It is therefore wise to keep a copy of the original,
until correctness of the changes is ascertained.
For design objects, changes are only committed, if no forbidden editing has been done: Changes in values of the experimental factors are not allowed and prevent storing edited information (only reported after the fact, user has no choice in the matter). If the editing would destroy the structure of the design, e.g. because something was typed into an empty row of the data editor which leads to an extra row with missing values, a prompt allows to abort the changes; if changes are committed, the data frame is stored under its original name without any of its attributes (and can thus no longer be treated by any special tools for design objects).
The default method for showData
is the function from package relimp,
which is also used in R-Commander for viewing data sets. The method for class design
objects
is needed for successfully using the view button of design
dataframes in R-commander.
They are undesigned before viewing. However, it is preferrable to inspect a printout from function
print.design
which provides additional information.
This can also be done in the R-Commander using the Design
menu in package RcmdrPlugin.DoE
(to be available soon).
See also fix
and the links therein
# NOT RUN {
# }
# NOT RUN {
plan <- oa.design(L18)
fix(plan)
## manually add some numeric data for the response
response.names(plan)
fix(plan, prompt=TRUE)
## manually add at least two numeric response columns
## select from menu which ones are to be responses
response.names(plan)
# }
Run the code above in your browser using DataLab