# #——包括= FALSE --------------------------------------------------------- knitr: opts_chunk美元集(崩溃= TRUE,发表评论 = "#>" ) stopifnot (requireNamespace(“htmltools”))htmltools::标记列表(rmarkdown:: html_dependency_font_awesome ()) ## ---- 设置 -------------------------------------------------------------------- 库(ExploreModelMatrix ) ## ---- fig.width = 5 ----------------------------------------------------------- ( sampleData < - data.frame(基因型=代表(c(“A”、“B”),每个= 4),treatment = rep(c("ctrl", "trt"), 4))) vd <- VisualizeDesign(sampleData = sampleData, designFormula = ~ genotype + treatment, textsizefit = 4) cowplot::plot_grid(plotlist = vd$plotlist) app <- ExploreModelMatrix(sampleData = sampleData, designFormula = ~ genotype + treatment) if (interactive()) shiny::runApp(app) ## ----图.width = 5,图.height = 12------------------------------------------ (sampleData <- data.frame(Response = rep(c("Resistant", "Sensitive"), c(12,18)),Patient = factor(rep(c(1:6, 8,11:18), each = 2)), Treatment = factor(rep(c("pre","post"), 15)), ind.n = factor(rep(c(1:6, 2,5:12), each = 2)))) vd <- VisualizeDesign(sampleData = sampleData, designFormula = ~ Response + Response:ind。n + Response:Treatment, textsizefitit = 3) cowplot::plot_grid(plotlist = vd$plotlist, ncol = 1) app <- ExploreModelMatrix(sampleData = sampleData, designFormula = ~ Response + Response:ind。n +回应:如果(互动())的治疗)::runApp(应用程序 ) ## ---- fig.width = 5 ----------------------------------------------------------- vd < VisualizeDesign (sampleData = sampleData designFormula = ~ +治疗反应,textSizeFitted = 4) cowplot:: plot_grid (plotlist = vd plotlist美元,ncol = 1 ) ## ---- fig.height = 4, fig.width = 6 ------------------------------------------- ( sampleData = data.frame(条件=因素(代表(c(“ctrl_minus”、“ctrl_plus”,“ko_minus”、“ko_plus”),3)),批=因素(代表(1:6,每个= 2))))vd <——VisualizeDesign (sampleData = sampleData designFormula = ~ 0 +批+条件,textSizeFitted = 4, lineWidthFitted = 20, dropCols =“conditionko_minus”)cowplot:: plot_grid (plotlist = vd plotlist美元,ncol = 1)应用<——ExploreModelMatrix批(sampleData = sampleData designFormula = ~ +条件)如果(互动())的::runApp(应用程序 ) ## ----------------------------------------------------------------------------- sessionInfo ()