Skip to content

Commit

Permalink
Merge pull request #4 from onnela-lab/cran-rev1
Browse files Browse the repository at this point in the history
Address comments from CRAN review.
  • Loading branch information
tillahoffmann authored Dec 18, 2023
2 parents 134d785 + 0a37049 commit 4836e84
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 8 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Makefile
^LICENSE\.md$
^gptoolsStan\.Rcheck$
^.*?\.tar\.gz$
^playground$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ build
.DS_Store
CRAN-SUBMISSION
.Rhistory
playground
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: gptoolsStan
Title: Gaussian Processes on Graphs and Lattices in Stan
Title: Gaussian Processes on Graphs and Lattices in 'Stan'
Version: 0.1.0
Authors@R: c(
person("Till", "Hoffmann", , "[email protected]", role = c("aut", "cre"),
Expand All @@ -8,9 +8,11 @@ Authors@R: c(
comment = c(ORCID = "0000-0001-6613-8668")))
Description: Gaussian processes are flexible distributions to model functional data. Whilst
theoretically appealing, they are computationally cumbersome except for small datasets.
This package implements two methods for scaling GP inference in Stan. First, a sparse
approximation of the likelihood that is generally applicable and, second, an exact method for
regularly spaced data modeled by stationary kernels using fast Fourier methods.
This package implements two methods for scaling Gaussian process inference in 'Stan'. First, a
sparse approximation of the likelihood that is generally applicable and, second, an exact method
for regularly spaced data modeled by stationary kernels using fast Fourier methods. Utility
functions are provided to compile and fit 'Stan' models using the 'cmdstanr' interface.
References: Hoffmann and Onnela (2022) <arXiv:2301.08836>.
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-US
Expand Down
14 changes: 13 additions & 1 deletion R/model.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#' Get the gptools include path for compiling Stan programs with `cmdstanr`.
#' Get the 'gptoolsStan' include path for compiling 'Stan' programs.
#'
#' @export
#' @return Path to the directory containing source files for 'gptoolsStan' as characters.
#' @examples
#' \dontrun{
#' library(cmdstanr)
#' library(gptoolsStan)
#'
#' # Compile the model with paths set up to include 'Stan' sources from 'gptoolsStan'.
#' model <- cmdstan_model(
#' stan_file="/path/to/your/model.stan",
#' include_paths=gptools_include_path(),
#' )
#' }
gptools_include_path <- function() {
system.file("extdata", package="gptoolsStan")
}
34 changes: 33 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
## R CMD check results
# Revisions in response to comments from 2023-12-18 for resubmission of 0.1.0.

Thank you for the comments. Please find point-by-point responses below. Code changes are available at https://github.com/onnela-lab/gptoolsStan/pull/4.

> Please always write package names, software names and API (application programming interface) names in single quotes in title and description. e.g: --> 'Stan' Please note that package names are case sensitive.
We have wrapped 'Stan' and 'cmdstanr' in single quotes.

> Please always explain all acronyms in the description text. -> 'GP'
We have expanded acronyms.

> If there are references describing the methods in your package, please add these in the description field of your DESCRIPTION file in the form
> authors (year) <doi:...>
> authors (year) <arXiv:...>
> authors (year, ISBN:...)
> or if those are not available: <https:...>
> with no space after 'doi:', 'arXiv:', 'https:' and angle brackets for auto-linking. (If you want to add a title as well please put it in quotes: "Title")
We have added a reference.

> Please add `\value` to `.Rd` files regarding exported methods and explain the functions results in the documentation. Please write about the structure of the output (class) and also what the output means. (If a function does not return a value, please document that too, e.g. `\value{No return value, called for side effects}` or similar)
> Missing Rd-tags:
>
> - `gptools_include_path.Rd: \value`
We have added a `\value` tag.

> Please add small executable examples in your Rd-files to illustrate the use of the exported function but also enable automatic testing.
We have added an example to the `.Rd` files. It is however wrapped in `\dontrun` because running the example requires that 'cmdstan' and 'cmdstanr' are installed.

# R CMD check results for first submission 0.1.0.

0 errors | 0 warnings | 1 note

Expand Down
19 changes: 17 additions & 2 deletions man/gptools_include_path.Rd

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

0 comments on commit 4836e84

Please sign in to comment.