Skip to content

Commit

Permalink
📝 - use \donttest in examples; update readme, description, news
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanocoretta committed Jan 8, 2021
1 parent 9b15bb3 commit 2a53b3c
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 18 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: rticulate
Type: Package
Title: Ultrasound Tongue Imaging in R
Version: 1.7.1
Date: 2021-01-05
Version: 1.7.2
Date: 2021-01-08
Authors@R: c(person(given = "Stefano",
family = "Coretta",
email = paste0("stefano.coretta", "@", "gmail.com"),
Expand Down
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# rticulate v1.7.2

## Added

* 📝 - @return filled in the documentation of functions.

## Changed

* 📝 - Use `\donttest` instead of `\dontrun`.




# rticulate v1.7.0

## Added
Expand Down
6 changes: 4 additions & 2 deletions R/gam.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
#' \code{\link[mgcv]{gamObject}}.
#'
#' @examples
#' \donttest{
#' library(tidyverse)
#' tongue_it01 <- filter(tongue, speaker == "it01")
#' pgam <- polar_gam(Y ~ s(X, by = c2_place) + s(X, word, bs = "fs"),
#' data = tongue_it01)
#'
#' }
#' @export
polar_gam <- function(formula, data, origin = NULL, fan_lines = c(10, 25), AR_start = NULL, ...) {
if (is.null(origin)) {
Expand Down Expand Up @@ -68,6 +69,7 @@ polar_gam <- function(formula, data, origin = NULL, fan_lines = c(10, 25), AR_st
#'
#' @return A tibble with predictions from a \link[rticulate]{polar_gam} model.
#' @examples
#' \donttest{
#' library(tidyverse)
#' tongue_it01 <- filter(tongue, speaker == "it01")
#' it01_pol <- polar_gam(Y ~ s(X, by = c2_place) + s(X, word, bs = "fs"),
Expand All @@ -79,7 +81,7 @@ polar_gam <- function(formula, data, origin = NULL, fan_lines = c(10, 25), AR_st
#' # get predictions excluding the random smooth for word (the coefficient for
#' # the random smooth is set to 0)
#' it01_excl_rand <- predict_polar_gam(it01_pol, exclude_terms = "s(X,word)")
#'
#' }
#' @export
predict_polar_gam <- function(model, origin = NULL, exclude_terms = NULL, length_out = 50, values = NULL, return_ci = FALSE, ci_z = 1.96) {
n_terms <- length(model[["var.summary"]])
Expand Down
3 changes: 2 additions & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ plot_tongue <- function(data, geom = "line", ..., palate = NULL, palate_col = "g
#' @return An object of class \code{\link[ggplot2]{ggplot}}.
#'
#' @examples
#' \donttest{
#' library(tidyverse)
#' tongue_it01 <- filter(tongue, speaker == "it01")
#' pgam <- polar_gam(Y ~ s(X, by = as.factor(label)), data = tongue_it01)
#'
#' plot_polar_smooths(pgam, X, label)
#'
#' }
#' @export
plot_polar_smooths <- function(model, series, comparison = NULL, origin = NULL, facet_terms = NULL, conditions = NULL, exclude_random = TRUE, series_length = 100, split = NULL, sep = "\\.", time_series) {
if(!missing(time_series)) {
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ knitr::opts_chunk$set(
# rticulate: Ultrasound Tongue Imaging in R <img src='man/figures/logo.png' align="right" height="120" />

<!-- badges: start -->
`r badger::badge_github_version(color = "blue")`
`r badger::badge_github_version(color = "orange")`
`r badger::badge_github_actions()`
<!-- badges: end -->

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<!-- badges: start -->

[![](https://img.shields.io/badge/devel%20version-1.6.0.9000-blue.svg)](https://github.com/stefanocoretta/rticulate)
[![](https://img.shields.io/badge/devel%20version-1.7.2-orange.svg)](https://github.com/stefanocoretta/rticulate)
[![R build
status](https://github.com/stefanocoretta/rticulate/workflows/R-CMD-check/badge.svg)](https://github.com/stefanocoretta/rticulate/actions)
<!-- badges: end -->
Expand Down
24 changes: 16 additions & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
## Resubmission
This is a resubmission. In this version I have:

* Added \value in the documentation of the functions.

* Wrapped documentation examples in \donttest if execution > 5s on at least one of tested environments (plot_polar_smooths(), plot_polar_smooths(), polar_gam()).

## Test environments
* local R installation (macOS 11.1), R 4.0.3
* ubuntu 16.04 (on travis-ci), R 4.0.3
* win-builder (release)
* win-builder (oldrelease)
* win-builder (devel)
- R-hub windows-x86_64-devel (r-devel)
- R-hub ubuntu-gcc-release (r-release)
- R-hub fedora-clang-devel (r-devel)

## R CMD check results
> On windows-x86_64-devel (r-devel), ubuntu-gcc-release (r-release), fedora-clang-devel (r-devel)
checking CRAN incoming feasibility ... NOTE
Maintainer: 'Stefano Coretta <[email protected]>'

New submission

0 errors | 0 warnings | 1 note

* This is a new release.
0 errors ✓ | 0 warnings ✓ | 1 note x
3 changes: 2 additions & 1 deletion man/plot_polar_smooths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/polar_gam.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/predict_polar_gam.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2a53b3c

Please sign in to comment.