1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 06:06:12 +01:00

support for older versions of ggplot2

This commit is contained in:
dr. M.S. (Matthijs) Berends 2018-08-29 16:39:28 +02:00
parent d654444c8e
commit 98ff131680
2 changed files with 14 additions and 10 deletions

View File

@ -66,11 +66,6 @@
#' select(amox, nitr, fosf, trim, cipr) %>%
#' ggplot_rsi()
#'
#' # for colourblind mode, use divergent colours from the viridis package:
#' septic_patients %>%
#' select(amox, nitr, fosf, trim, cipr) %>%
#' ggplot_rsi() + scale_fill_viridis_d()
#'
#' # get counts instead of percentages:
#' septic_patients %>%
#' select(amox, nitr, fosf, trim, cipr) %>%
@ -85,6 +80,13 @@
#' linetype = 2,
#' alpha = 0.25)
#' \donttest{
#'
#' # for colourblind mode, use divergent colours from the viridis package:
#' septic_patients %>%
#' select(amox, nitr, fosf, trim, cipr) %>%
#' ggplot_rsi() + scale_fill_viridis_d()
#'
#'
#' # it also supports groups (don't forget to use the group on `x` or `facet`):
#' septic_patients %>%
#' select(hospital_id, amox, nitr, fosf, trim, cipr) %>%

View File

@ -85,11 +85,6 @@ septic_patients \%>\%
select(amox, nitr, fosf, trim, cipr) \%>\%
ggplot_rsi()
# for colourblind mode, use divergent colours from the viridis package:
septic_patients \%>\%
select(amox, nitr, fosf, trim, cipr) \%>\%
ggplot_rsi() + scale_fill_viridis_d()
# get counts instead of percentages:
septic_patients \%>\%
select(amox, nitr, fosf, trim, cipr) \%>\%
@ -104,6 +99,13 @@ septic_patients \%>\%
linetype = 2,
alpha = 0.25)
\donttest{
# for colourblind mode, use divergent colours from the viridis package:
septic_patients \%>\%
select(amox, nitr, fosf, trim, cipr) \%>\%
ggplot_rsi() + scale_fill_viridis_d()
# it also supports groups (don't forget to use the group on `x` or `facet`):
septic_patients \%>\%
select(hospital_id, amox, nitr, fosf, trim, cipr) \%>\%