diff --git a/DESCRIPTION b/DESCRIPTION index 401d473..83858e4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ExploreModelMatrix Type: Package Title: Graphical Exploration of Design Matrices -Version: 1.1.1 +Version: 1.1.2 Authors@R: c(person("Charlotte", "Soneson", role = c("aut", "cre"), email = "charlottesoneson@gmail.com", comment = c(ORCID = "0000-0003-3833-2169")), diff --git a/R/ExampleDesigns.R b/R/ExampleDesigns.R index 3247ec5..22acd21 100644 --- a/R/ExampleDesigns.R +++ b/R/ExampleDesigns.R @@ -3,7 +3,8 @@ #' @param exampleID The name of the example design. One of "One factor, unpaired #' samples", "One factor, paired samples", "Two crossed factors", "Two #' crossed, one blocking factor", "Two crossed, one nested factor", "Two -#' crossed, one nested factor, dummy coded" +#' crossed, one nested factor, dummy coded", "Two crossed, one nested factor +#' (manuscript example)" #' #' @author Charlotte Soneson #' @@ -57,6 +58,15 @@ rep(c("A", "B", "C"), each = 6)) ) design <- "~ diagnosis + diagnosis:dummy + diagnosis:treatment" + } else if (exampleID == "Two crossed, one nested factor (manuscript example)") { + sampledata <- data.frame( + subject = paste0("S", rep(1:6, each = 2)), + count = factor(rep(c("ref", "alt"), 6), levels = c("ref", "alt")), + condition = rep(c("control", "treated"), each = 6), + subjectdummy = rep(paste0("D", rep(1:3, each = 2)), 2), + stringsAsFactors = FALSE + ) + design <- "~condition + condition:subjectdummy + condition:count" } else { stop("Unidentified example ID") } diff --git a/R/ExploreModelMatrix.R b/R/ExploreModelMatrix.R index 8667056..2add468 100644 --- a/R/ExploreModelMatrix.R +++ b/R/ExploreModelMatrix.R @@ -413,7 +413,8 @@ ExploreModelMatrix <- function(sampleData = NULL, designFormula = NULL) { "Two crossed factors", "Two crossed, one blocking factor", "Two crossed, one nested factor", - "Two crossed, one nested factor, dummy coded"), + "Two crossed, one nested factor, dummy coded", + "Two crossed, one nested factor (manuscript example)"), selectize = TRUE, multiple = FALSE ) }) diff --git a/man/INTERNAL_.ExampleDesigns.Rd b/man/INTERNAL_.ExampleDesigns.Rd index 7d3856c..ae72d17 100644 --- a/man/INTERNAL_.ExampleDesigns.Rd +++ b/man/INTERNAL_.ExampleDesigns.Rd @@ -10,7 +10,8 @@ \item{exampleID}{The name of the example design. One of "One factor, unpaired samples", "One factor, paired samples", "Two crossed factors", "Two crossed, one blocking factor", "Two crossed, one nested factor", "Two -crossed, one nested factor, dummy coded"} +crossed, one nested factor, dummy coded", "Two crossed, one nested factor +(manuscript example)"} } \value{ A list with two elements: the sample data table and the design