Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
Package: forestmodel
Encoding: UTF-8
Type: Package
Package: forestmodel
Title: Forest Plots from Regression Models
Version: 0.6.3
Date: 2020-08-08
Authors@R: c(
person("Nick", "Kennedy, email = "r@nick-kennedy.com", role = c("aut", "cre")),
person("Shixiang", "Wang", email = "w_shixiang@163.com", role = "aut"))
Authors@R:
c(person(given = "Nick",
family = "Kennedy",
role = c("aut", "cre"),
email = "r@nick-kennedy.com"),
person(given = "Shixiang",
family = "Wang",
role = "aut",
email = "w_shixiang@163.com"))
Maintainer: Nick Kennedy <r@nick-kennedy.com>
Description: Produces forest plots using 'ggplot2' from models produced by functions
such as stats::lm(), stats::glm() and survival::coxph().
Description: Produces forest plots using 'ggplot2' from models produced by
functions such as stats::lm(), stats::glm() and survival::coxph().
License: GPL-2
LazyData: TRUE
Depends: R (>= 3.3.0),
ggplot2 (>= 3.1.0)
Imports: dplyr (>= 0.8.0),
Depends:
ggplot2 (>= 3.1.0),
R (>= 3.3.0)
Imports:
broom (>= 0.5.0),
dplyr (>= 0.8.0),
rlang (>= 0.3.0),
tibble (>= 1.4.2)
Suggests: survival,
Suggests:
labelled,
metafor,
labelled
survival
Encoding: UTF-8
LazyData: TRUE
RoxygenNote: 7.1.1
3 changes: 3 additions & 0 deletions R/forest_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,16 @@ forest_model <- function(model,
mutate(model_name = model_names[i])
}) %>%
bind_rows()
forest_terms = forest_terms %>% mutate(model_name = factor(model_name, levels = unique(model_name)))
if (merge_models) {
forest_terms$model_name <- NULL
}
} else {
forest_terms <- make_forest_terms(model)
}

forest_terms = forest_terms %>% mutate(term_label = factor(term_label, levels = unique(term_label)))

# #use_exp <- grepl("exp", deparse(trans))
if (!is.null(limits)) {
forest_terms <- forest_terms %>%
Expand Down