Skip to content

Commit

Permalink
Load ExploreModelMatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
lcolladotor committed Jul 4, 2023
1 parent b3d0f29 commit 401e502
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions 09_ExploreModelMatrix.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
## ----model.matrix----------------------------------------------------
## ----model.matrix----------------------------------------
## ?model.matrix
mat <- with(trees, model.matrix(log(Volume) ~ log(Height) + log(Girth)))
mat
colnames(mat)


## ----lm_example------------------------------------------------------
## ----lm_example------------------------------------------
summary(lm(log(Volume) ~ log(Height) + log(Girth), data = trees))


## ----EMM_example1----------------------------------------------------
## ----EMM_example1----------------------------------------
## Load ExploreModelMatrix
library("ExploreModelMatrix")

## Example data
(sampleData <- data.frame(
genotype = rep(c("A", "B"), each = 4),
Expand All @@ -27,7 +30,7 @@ vd <- ExploreModelMatrix::VisualizeDesign(
cowplot::plot_grid(plotlist = vd$plotlist)


## ----EMM_example1_interactive, eval = FALSE--------------------------
## ----EMM_example1_interactive, eval = FALSE--------------
## ## We are using shiny again here
## app <- ExploreModelMatrix(
## sampleData = sampleData,
Expand Down
3 changes: 3 additions & 0 deletions 09_ExploreModelMatrix.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ summary(lm(log(Volume) ~ log(Height) + log(Girth), data = trees))
## Example 1

```{r EMM_example1}
## Load ExploreModelMatrix
library("ExploreModelMatrix")
## Example data
(sampleData <- data.frame(
genotype = rep(c("A", "B"), each = 4),
Expand Down

0 comments on commit 401e502

Please sign in to comment.