Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: stefanocoretta/tidymv
Choose a Base Repository
Nothing to show
base: v1.1.0
head repository: stefanocoretta/tidymv
Choose a Head Repository
Nothing to show
compare: v1.2.0
  • 6 commits
  • 7 files changed
  • 0 comments
  • 1 contributor
Showing with 24 additions and 8 deletions.
  1. +1 −0 .gitignore
  2. +2 −1 DESCRIPTION
  3. +8 −0 NEWS.md
  4. +7 −4 R/functions.R
  5. +1 −1 README.md
  6. +1 −1 man/create_event_start.Rd
  7. +4 −1 man/plot_gamsd.Rd
@@ -4,3 +4,4 @@
.Ruserdata
*.Rproj
inst/doc
*.DS_Store
@@ -1,7 +1,7 @@
Package: tidymv
Type: Package
Title: Tidy Model Visualisation
Version: 1.1.0
Version: 1.2.0
Authors@R: person("Stefano", "Coretta", email = paste0("stefano.coretta", "@", "gmail.com"),
role = c("aut", "cre"))
Description: This package provides functions for model visualisation using tidy
@@ -10,6 +10,7 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Depends: itsadug
Imports: tidyverse,
cowplot,
dplyr,
@@ -1,5 +1,13 @@
# Change Log

## 1.2.0 - 2017-12-07
### Added
- `rm_re` parameter for removing random effects in `plot_gamsd`
- depends on `itsadug`

### Changed
- argument `event.col` to `event_col` in `create_start_event()` for style consistency

## [1.1.0] - 2017-10-31
### Added
- black and white option for `plot_gamsd()`
@@ -8,11 +8,11 @@
#' @param event.col A string with the name of the column that defines the time series.
#'
#' @export
create_event_start <- function(tibble, event.col) {
create_event_start <- function(tibble, event_col) {
dplyr::mutate(
tibble,
start.event = ifelse(
as.character(tibble[[event.col]]) == lag(as.character(tibble[[event.col]]), default = FALSE),
as.character(tibble[[event_col]]) == lag(as.character(tibble[[event_col]]), default = FALSE),
FALSE,
TRUE
)
@@ -29,16 +29,18 @@ create_event_start <- function(tibble, event.col) {
#' @param view The predictor determining the time series.
#' @param comparison The levels for the comparison as a named list.
#' @param conditions The values to use for other predictors as a named list.
#' @param rm_re Whether to remove random effects (the default is \code{FALSE}).
#' @param bw Whether to plot in black and white (the default is \code{FALSE}).
#'
#' @importFrom magrittr "%>%"
#' @export
plot_gamsd <- function(model, view, comparison, conditions = NULL, bw = FALSE) {
plot_gamsd <- function(model, view, comparison, conditions = NULL, rm_re = FALSE, bw = FALSE) {
diff.df <- itsadug::plot_diff(
model,
view = view,
comp = comparison,
cond = conditions,
rm.ranef = rm_re,
plot = FALSE,
print.summary = FALSE)

@@ -51,7 +53,8 @@ plot_gamsd <- function(model, view, comparison, conditions = NULL, bw = FALSE) {

smooth.df <- itsadug::get_predictions(
model,
cond = c(comparison, condition)
cond = c(comparison, condition),
rm.ranef = rm_re
)

sig.diff <- itsadug::find_difference(
@@ -4,4 +4,4 @@ This is the repository of the `R` package `tidymv`. This package provides functi

## Installation

To install the package, use devtools::install_github("stefanocoretta/tidymv@v1.1.0", build_vignettes = TRUE). To learn how to use the package, do vignette("plot-gamms", package = "tidymv") after the installation.
To install the package, use `devtools::install_github("stefanocoretta/tidymv@v1.1.0", build_vignettes = TRUE)`. To learn how to use the package, do `vignette("plot-gamms", package = "tidymv")` after the installation.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

No commit comments for this range

You can’t perform that action at this time.