Skip to content

Commit

Permalink
Address CRAN WARN checks in DEVEL (#17)
Browse files Browse the repository at this point in the history
* Remove CXX_STD and re-generate Rcpp attributes

* Fix URLs in README and update text

* Address parameter name appearing in a non-generated Rd on CRAN

* Update requirements

* Space

* Update CITATION format

* Update release notes

* Block CRAN-SUBMISSION file
  • Loading branch information
coatless authored Nov 29, 2023
1 parent f11b04c commit dd8a4d7
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 52 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ man-roxygen
^docs$
^pkgdown$
^\.github$
^CRAN-SUBMISSION$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docs/
CRAN-RELEASE
docs
.DS_Store
CRAN-SUBMISSION
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ Authors@R: c(
Description: Implementation of Gibbs sampling algorithm for Bayesian Estimation
of the Reduced Reparameterized Unified Model ('rrum'), described by
Culpepper and Hudson (2017) <doi: 10.1177/0146621617707511>.
URL: https://tmsalab.github.io/rrum, https://github.com/tmsalab/rrum
URL: https://tmsalab.github.io/rrum/, https://github.com/tmsalab/rrum
BugReports: https://github.com/tmsalab/rrum/issues
License: GPL (>= 2)
Depends: R (>= 3.4.0), simcdm (>= 0.1.0)
Imports: Rcpp (>= 1.0.0)
LinkingTo: Rcpp, RcppArmadillo (>= 0.9.200), rgen, simcdm
Depends: R (>= 4.1.0), simcdm (>= 0.1.0)
Imports: Rcpp (>= 1.0.11)
LinkingTo: Rcpp, RcppArmadillo (>= 0.12.6.6.0), rgen, simcdm
Suggests:
testthat,
covr
SystemRequirements: C++11
Encoding: UTF-8
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
14 changes: 13 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# rrum 0.2.2

## Bugfixes

- Addressed two issues in R-devel related to C++ usage (deprecation of `CXX_STD` and attribute compilation woes). ([#15](https://github.com/tmsalab/rrum/issues/15))
- Changed the format in `CITATION` to use `c()` instead of `as.personList()` and
switched entries from `citEntry()` to `bibentry()`.

## Deployment

- Updated GitHub Actions for testing, pkgdown, and coverage ([#16](https://github.com/tmsalab/rrum/pull/16)).

# rrum 0.2.1

## Documentation

- Added a `pkgdown` website that deploys to <http://tmsalab.github.io/rrum> ([#12](https://github.com/tmsalab/rrum/pull/12), [#14](https://github.com/tmsalab/rrum/pull/14)).
- Added a `pkgdown` website that deploys to <https://tmsalab.github.io/rrum/> ([#12](https://github.com/tmsalab/rrum/pull/12), [#14](https://github.com/tmsalab/rrum/pull/14)).
- Pruned non-user facing documentation entry ([#14](https://github.com/tmsalab/rrum/pull/14)).

## Deployment
Expand Down
4 changes: 2 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' of the items.An entry of 1 indicates attribute \eqn{k}
#' is required to answer item \eqn{j}. An entry of one
#' indicates attribute \eqn{k} is not required.
#' @param delta0 A `vector`, parameters for the Dirichlet prior on `pi`.
#' @param chain_length A `numeric` indicating the number of iterations of
#' Gibbs sampler to be run. Default is set to 10000.
#' @param as A `numeric`, parameter for the prior distribution of
Expand All @@ -28,7 +29,6 @@
#' @param bg A `numeric`, parameter for the prior distribution of
#' `pistar`. High values as encourage lower values of
#' `rstar`.
#' @param deltas A `vector`, parameters for the Dirichlet prior on `pi`.
#'
#' @return A `List`
#'
Expand Down Expand Up @@ -57,5 +57,5 @@ rrum_helper <- function(Y, Q, delta0, chain_length = 10000L, as = 1, bs = 1, ag

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
.Call('_rrum_RcppExport_registerCCallable', PACKAGE = 'rrum')
.Call(`_rrum_RcppExport_registerCCallable`)
})
45 changes: 29 additions & 16 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ knitr::opts_chunk$set(
# rrum

<!-- badges: start -->
[![R build status](https://github.com/tmsalab/rrum/workflows/R-CMD-check/badge.svg)](https://github.com/tmsalab/rrum/actions)
[![Package-License](http://img.shields.io/badge/license-GPL%20(%3E=2)-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN Version Badge](http://www.r-pkg.org/badges/version/rrum)](https://cran.r-project.org/package=rrum)
[![CRAN Status](https://cranchecks.info/badges/worst/rrum)](https://cran.r-project.org/web/checks/check_results_rrum.html)
[![RStudio CRAN Mirror's Monthly Downloads](http://cranlogs.r-pkg.org/badges/rrum?color=brightgreen)](http://www.r-pkg.org/pkg/rrum)
[![RStudio CRAN Mirror's Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/rrum?color=brightgreen)](http://www.r-pkg.org/pkg/rrum)
[![Coverage test coverage](https://codecov.io/gh/tmsalab/rrum/branch/master/graph/badge.svg)](https://codecov.io/github/tmsalab/rrum?branch=master)
[![R-CMD-check](https://github.com/tmsalab/rrum/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tmsalab/rrum/actions/workflows/R-CMD-check.yaml)
[![Package-License](https://img.shields.io/badge/license-GPL%20(%3E=2)-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN Version Badge](https://www.r-pkg.org/badges/version/rrum)](https://cran.r-project.org/package=rrum)
[![CRAN Status](https://badges.cranchecks.info/worst/rrum.svg)](https://cran.r-project.org/web/checks/check_results_rrum.html)
[![RStudio CRAN Mirror's Monthly Downloads](https://cranlogs.r-pkg.org/badges/rrum?color=brightgreen)](https://www.r-pkg.org/pkg/rrum)
[![RStudio CRAN Mirror's Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/rrum?color=brightgreen)](https://www.r-pkg.org/pkg/rrum)
<!-- badges: end -->

The goal of `rrum` is to provide an implementation of Gibbs sampling algorithm
Expand All @@ -32,42 +31,54 @@ described by Culpepper and Hudson (2017) <doi: 10.1177/0146621617707511>.

You can install `rrum` from CRAN using:

```{r cran-installation, eval = FALSE}
```{r}
#| label: cran-installation
#| eval: false
install.packages("rrum")
```

Or, you can be on the cutting-edge development version on GitHub using:

```{r gh-installation, eval = FALSE}
if(!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("tmsalab/rrum")
```{r}
#| label: gh-installation
#| eval: false
# install.packages('remotes')
remotes::install_github("tmsalab/rrum")
```

## Usage

To use `rrum`, load the package using:

```{r example}
```{r}
#| label: example
#| eval: false
library("rrum")
```

From here, the rRUM model can be estimated using:

```{r rrum-est, eval = FALSE}
```{r}
#| label: rrum-est
#| eval: false
rrum_model = rrum(<data>, <q>)
```

Additional parameters can be accessed with:

```{r rrum-est-adv, eval = FALSE}
```{r}
#| label: rrum-est-adv
#| eval: false
rrum_model = rrum(<data>, <q>, chain_length = 10000L,
as = 1, bs = 1, ag = 1, bg = 1,
delta0 = rep(1, 2^ncol(Q)))
```

`rRUM` item data can be simulated using:

```{r rrum-sim, eval = FALSE}
```{r}
#| label: rrum-sim
#| eval: false
# Set a seed for reproducibility
set.seed(888)
Expand Down Expand Up @@ -106,7 +117,9 @@ To ensure future development of the package, please cite `rrum`
package if used during an analysis or simulation study. Citation information
for the package may be acquired by using in *R*:

```{r, eval = FALSE}
```{r}
#| label: citation
#| eval: false
citation("rrum")
```

Expand Down
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@

<!-- badges: start -->

[![R build
status](https://github.com/tmsalab/rrum/workflows/R-CMD-check/badge.svg)](https://github.com/tmsalab/rrum/actions)
[![Package-License](http://img.shields.io/badge/license-GPL%20\(%3E=2\)-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
[![R-CMD-check](https://github.com/tmsalab/rrum/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tmsalab/rrum/actions/workflows/R-CMD-check.yaml)
[![Package-License](https://img.shields.io/badge/license-GPL%20(%3E=2)-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN Version
Badge](http://www.r-pkg.org/badges/version/rrum)](https://cran.r-project.org/package=rrum)
Badge](https://www.r-pkg.org/badges/version/rrum)](https://cran.r-project.org/package=rrum)
[![CRAN
Status](https://cranchecks.info/badges/worst/rrum)](https://cran.r-project.org/web/checks/check_results_rrum.html)
Status](https://badges.cranchecks.info/worst/rrum.svg)](https://cran.r-project.org/web/checks/check_results_rrum.html)
[![RStudio CRAN Mirror’s Monthly
Downloads](http://cranlogs.r-pkg.org/badges/rrum?color=brightgreen)](http://www.r-pkg.org/pkg/rrum)
Downloads](https://cranlogs.r-pkg.org/badges/rrum?color=brightgreen)](https://www.r-pkg.org/pkg/rrum)
[![RStudio CRAN Mirror’s Total
Downloads](http://cranlogs.r-pkg.org/badges/grand-total/rrum?color=brightgreen)](http://www.r-pkg.org/pkg/rrum)
[![Coverage test
coverage](https://codecov.io/gh/tmsalab/rrum/branch/master/graph/badge.svg)](https://codecov.io/github/tmsalab/rrum?branch=master)
Downloads](https://cranlogs.r-pkg.org/badges/grand-total/rrum?color=brightgreen)](https://www.r-pkg.org/pkg/rrum)
<!-- badges: end -->

The goal of `rrum` is to provide an implementation of Gibbs sampling
Expand All @@ -36,8 +33,8 @@ install.packages("rrum")
Or, you can be on the cutting-edge development version on GitHub using:

``` r
if(!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("tmsalab/rrum")
# install.packages('remotes')
remotes::install_github("tmsalab/rrum")
```

## Usage
Expand All @@ -46,7 +43,6 @@ To use `rrum`, load the package using:

``` r
library("rrum")
#> Loading required package: simcdm
```

From here, the rRUM model can be estimated using:
Expand Down
6 changes: 3 additions & 3 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
citHeader("To cite the 'rrum' R package and method paper in publications use:")

citEntry(entry = "Manual",
bibentry(bibtype = "Manual",
title = "{rrum: Bayesian Estimation of the Reduced Reparameterized Unified Model with Gibbs Sampling}",
author = personList(as.person("Steven Andrew Culpepper"),
author = c(as.person("Steven Andrew Culpepper"),
as.person("Aaron Hudson"),
as.person("James Joseph Balamuta")
),
Expand All @@ -12,7 +12,7 @@ citEntry(entry = "Manual",
"URL https://cran.r-project.org/package=rrum.")
)

citEntry(entry = "Article",
bibentry(bibtype = "Article",
title = "{An Improved Strategy for Bayesian Estimation of the Reduced Reparameterized Unified Model}",
author = personList(as.person("Steven Andrew Culpepper"),
as.person("Aaron Hudson")),
Expand Down
6 changes: 2 additions & 4 deletions man/rrum-package.Rd

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

3 changes: 0 additions & 3 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Enable C++11
CXX_STD=CXX11

# Enable the header file and OpenMP
PKG_CXXFLAGS=-I../inst/include $(SHLIB_OPENMP_CXXFLAGS)

Expand Down
3 changes: 0 additions & 3 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Enable C++11
CXX_STD=CXX11

# Enable the header file and OpenMP
PKG_CXXFLAGS=-I../inst/include $(SHLIB_OPENMP_CXXFLAGS)

Expand Down
7 changes: 6 additions & 1 deletion src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// rrum_helper
Rcpp::List rrum_helper(const arma::mat& Y, const arma::mat& Q, const arma::vec& delta0, unsigned int chain_length, double as, double bs, double ag, double bg);
static SEXP _rrum_rrum_helper_try(SEXP YSEXP, SEXP QSEXP, SEXP delta0SEXP, SEXP chain_lengthSEXP, SEXP asSEXP, SEXP bsSEXP, SEXP agSEXP, SEXP bgSEXP) {
Expand Down Expand Up @@ -45,7 +50,7 @@ RcppExport SEXP _rrum_rrum_helper(SEXP YSEXP, SEXP QSEXP, SEXP delta0SEXP, SEXP
if (rcpp_isError_gen) {
SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
UNPROTECT(1);
Rf_error(CHAR(rcpp_msgSEXP_gen));
Rf_error("%s", CHAR(rcpp_msgSEXP_gen));
}
UNPROTECT(1);
return rcpp_result_gen;
Expand Down
2 changes: 1 addition & 1 deletion src/rRUM_Gibbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Rcpp::List rrum_main(const arma::mat &Y, const arma::mat &Q,
//' of the items.An entry of 1 indicates attribute \eqn{k}
//' is required to answer item \eqn{j}. An entry of one
//' indicates attribute \eqn{k} is not required.
//' @param delta0 A `vector`, parameters for the Dirichlet prior on `pi`.
//' @param chain_length A `numeric` indicating the number of iterations of
//' Gibbs sampler to be run. Default is set to 10000.
//' @param as A `numeric`, parameter for the prior distribution of
Expand All @@ -199,7 +200,6 @@ Rcpp::List rrum_main(const arma::mat &Y, const arma::mat &Q,
//' @param bg A `numeric`, parameter for the prior distribution of
//' `pistar`. High values as encourage lower values of
//' `rstar`.
//' @param deltas A `vector`, parameters for the Dirichlet prior on `pi`.
//'
//' @return A `List`
//'
Expand Down

0 comments on commit dd8a4d7

Please sign in to comment.