Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sirplus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BioCellGen-public
sirplus
Commits
31e89de6
Commit
31e89de6
authored
7 years ago
by
Luke Zappia
Browse files
Options
Downloads
Patches
Plain Diff
Add panel function to vignette
parent
164135dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/compare.R
+2
-2
2 additions, 2 deletions
R/compare.R
vignettes/splatter.Rmd
+24
-0
24 additions, 0 deletions
vignettes/splatter.Rmd
with
26 additions
and
2 deletions
R/compare.R
+
2
−
2
View file @
31e89de6
...
...
@@ -621,7 +621,7 @@ makeDiffPanel <- function(diff, title = "Difference comparison",
stop
(
"The `cowplot` package is required to make panels."
)
}
checkmate
::
assertList
(
diff
,
any.missing
=
FALSE
,
len
=
4
)
checkmate
::
assertList
(
diff
,
any.missing
=
FALSE
,
len
=
5
)
checkmate
::
checkString
(
title
)
checkmate
::
checkCharacter
(
labels
,
len
=
7
)
...
...
@@ -716,7 +716,7 @@ makeOverallPanel <- function(comp, diff, title = "Overall comparison",
}
checkmate
::
assertList
(
comp
,
any.missing
=
FALSE
,
len
=
3
)
checkmate
::
assertList
(
diff
,
any.missing
=
FALSE
,
len
=
4
)
checkmate
::
assertList
(
diff
,
any.missing
=
FALSE
,
len
=
5
)
checkmate
::
checkString
(
title
)
checkmate
::
checkCharacter
(
row.labels
,
len
=
7
)
...
...
This diff is collapsed.
Click to expand it.
vignettes/splatter.Rmd
+
24
−
0
View file @
31e89de6
...
...
@@ -473,6 +473,30 @@ distributions.
difference$QQPlots$Means
```
## Making panels
Each of these comparisons makes several plots which can be a lot to look at. To
make this easier, or to produce figures for publications, you can make use of
the functions `makeCompPanel`, `makeDiffPanel` and `makeOverallPanel`.
These functions combine the plots into a single panel using the `cowplot`
package. The panels can be quite large and hard to view (for example in
RStudio's plot viewer) so it can be better to output the panels and view them
separately. Luckily `cowplot` provides a convenient function for saving the
images. Here are some suggested parameters for outputting each of the panels:
```{r save-panels, eval = FALSE}
# This code is just an example and is not run
panel <- makeCompPanel(comparison)
cowplot::save_plot("comp_panel.png", panel, nrow = 4, ncol = 3)
panel <- makeDiffPanel(difference)
cowplot::save_plot("diff_panel.png", panel, nrow = 3, ncol = 5)
panel <- makeOverallPanel(comparison, difference)
cowplot::save_plot("overall_panel.png", panel, ncol = 4, nrow = 7)
```
# Session information {-}
```{r sessionInfo}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment