validate_sedesign | R Documentation |
Validate SEDesign object contents
validate_sedesign(
object,
min_reps = 1,
samples = NULL,
groups = NULL,
contrasts = NULL,
verbose = FALSE,
...
)
object |
|
min_reps |
|
samples , groups , contrasts |
|
verbose |
|
... |
additional arguments are ignored. |
This function validates and enforces constraints on SEDesign
objects:
samples
must match rownames(design)
colnames(design)
must match rownames(contrasts)
If samples
does not exist, and rownames(design)
does exist,
then samples
will be defined as rownames(design)
.
If design
and samples
are provided, but rownames(design)
is empty, it must be the same length as samples
.
then rownames(design)
will be defined as samples
.
SEDesign
object after validation updates have been applied.
Other jam experiment design:
check_sedesign()
,
contrast2comp()
,
contrast_colors_by_group()
,
contrast_names_to_sedesign()
,
contrasts_to_factors()
,
contrasts_to_venn_setlists()
,
draw_oneway_contrast()
,
draw_twoway_contrast()
,
filter_contrast_names()
,
groups_to_sedesign()
,
plot_sedesign()
,
sedesign_to_factors()
factors2 <- rep(c("one", "two", "three", "four"), each=3)
factors2 <- factor(factors2,
levels=unique(factors2))
names(factors2) <- paste0("sample", seq_along(factors2))
factors2
mm2 <- model.matrix(~0 + factors2)
rownames(mm2) <- names(factors2)
colnames(mm2) <- levels(factors2);
mm2
icontrastnames <- c("two-one",
"four-three",
"(four-three)-(two-one)");
icon <- c(-1, 1, 0, 0,
0, 0, -1, 1,
1, -1, -1, 1)
icontrasts2 <- matrix(icon,
ncol=3,
dimnames=list(levels(factors2),
icontrastnames))
icontrasts2
condes2 <- new("SEDesign",
design=mm2,
contrasts=icontrasts2)
condes2
# now subset samples
validate_sedesign(condes2,
samples=paste0("sample", 2:12))
# now subset enough samples to remove one group
validate_sedesign(condes2,
samples=paste0("sample", 4:12))
validate_sedesign(condes2, groups=c("one", "two"))
condes2[, c("one", "two")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.