Skip to content

Commit

Permalink
Address CRAN WARN checks in DEVEL (#24)
Browse files Browse the repository at this point in the history
* Re-render documentation and compilation attributes

* Update README badges & install text

* Bump requirements

* Remove specific CXX request
  • Loading branch information
coatless committed Nov 29, 2023
1 parent 2a8aa74 commit 5df1c2b
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 55 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Expand Up @@ -28,16 +28,16 @@ URL: https://tmsalab.github.io/simcdm, https://github.com/tmsalab/simcdm
BugReports: https://github.com/tmsalab/simcdm/issues
License: GPL (>= 2)
Depends:
R (>= 3.5.0)
Imports: Rcpp (>= 1.0.0)
R (>= 4.1.0)
Imports: Rcpp (>= 1.0.11)
LinkingTo: Rcpp,
RcppArmadillo (>= 0.9.200)
RcppArmadillo (>= 0.12.6.6.0)
Suggests:
testthat,
covr,
knitr,
rmarkdown
VignetteBuilder: knitr
RoxygenNote: 6.1.1
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Encoding: UTF-8
2 changes: 1 addition & 1 deletion R/RcppExports.R
Expand Up @@ -334,5 +334,5 @@ sim_subject_attributes <- function(N, K, probs = NULL) {

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
.Call('_simcdm_RcppExport_registerCCallable', PACKAGE = 'simcdm')
.Call(`_simcdm_RcppExport_registerCCallable`)
})
15 changes: 8 additions & 7 deletions README.Rmd
Expand Up @@ -18,24 +18,24 @@ knitr::opts_chunk$set(
[![R-CMD-check](https://github.com/tmsalab/simcdm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tmsalab/simcdm/actions/workflows/R-CMD-check.yaml)
[![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/simcdm)](https://cran.r-project.org/package=simcdm)
[![CRAN Status](https://cranchecks.info/badges/worst/simcdm)](https://cran.r-project.org/web/checks/check_results_simcdm.html)
[![CRAN Status](https://badges.cranchecks.info/worst/simcdm.svg)](https://cran.r-project.org/web/checks/check_results_simcdm.html)
[![RStudio CRAN Mirror's Monthly Downloads](http://cranlogs.r-pkg.org/badges/simcdm?color=brightgreen)](http://www.r-pkg.org/pkg/simcdm)
[![RStudio CRAN Mirror's Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/simcdm?color=brightgreen)](http://www.r-pkg.org/pkg/simcdm)
[![Coverage test coverage](https://codecov.io/gh/tmsalab/simcdm/branch/master/graph/badge.svg)](https://codecov.io/github/tmsalab/simcdm?branch=master)
[![Coverage test coverage](https://codecov.io/gh/tmsalab/simcdm/branch/main/graph/badge.svg)](https://codecov.io/github/tmsalab/simcdm?branch=main)
<!-- badges: end -->

The goal of `simcdm` is to provide flexible ways to simulate data under
cognitive diagnostic models.

## Installation

You can install simcdm from GitHub with:
You can install `simcdm` from GitHub with:

```{r}
#| label: gh-installation
#| eval: false
# install.packages("devtools")
devtools::install_github("tmsalab/simcdm")
# install.packages("remotes")
remotes::install_github("tmsalab/simcdm")
```

## Usage
Expand All @@ -59,8 +59,9 @@ There are four distinct sets of functions within the package:

Functions that use random numbers to simulate values are named with the prefix of
`sim_*()`. This is done to allow for functions to be quickly identified and used
through autocomplete inside of the [RStudio IDE](https://www.rstudio.com). At
a later time, the `attribute_*()` will likely be moved to a different package.
through autocomplete inside of the [RStudio IDE](https://www.rstudio.com) or
[VS Code](https://code.visualstudio.com/). At a later time, the `attribute_*()`
will likely be moved to a different package.

For more details, please see the [package vignettes](vignettes/):

Expand Down
15 changes: 8 additions & 7 deletions README.md
Expand Up @@ -10,25 +10,25 @@
[![CRAN Version
Badge](http://www.r-pkg.org/badges/version/simcdm)](https://cran.r-project.org/package=simcdm)
[![CRAN
Status](https://cranchecks.info/badges/worst/simcdm)](https://cran.r-project.org/web/checks/check_results_simcdm.html)
Status](https://badges.cranchecks.info/worst/simcdm.svg)](https://cran.r-project.org/web/checks/check_results_simcdm.html)
[![RStudio CRAN Mirror’s Monthly
Downloads](http://cranlogs.r-pkg.org/badges/simcdm?color=brightgreen)](http://www.r-pkg.org/pkg/simcdm)
[![RStudio CRAN Mirror’s Total
Downloads](http://cranlogs.r-pkg.org/badges/grand-total/simcdm?color=brightgreen)](http://www.r-pkg.org/pkg/simcdm)
[![Coverage test
coverage](https://codecov.io/gh/tmsalab/simcdm/branch/master/graph/badge.svg)](https://codecov.io/github/tmsalab/simcdm?branch=master)
coverage](https://codecov.io/gh/tmsalab/simcdm/branch/main/graph/badge.svg)](https://codecov.io/github/tmsalab/simcdm?branch=main)
<!-- badges: end -->

The goal of `simcdm` is to provide flexible ways to simulate data under
cognitive diagnostic models.

## Installation

You can install simcdm from GitHub with:
You can install `simcdm` from GitHub with:

``` r
# install.packages("devtools")
devtools::install_github("tmsalab/simcdm")
# install.packages("remotes")
remotes::install_github("tmsalab/simcdm")
```

## Usage
Expand All @@ -53,8 +53,9 @@ There are four distinct sets of functions within the package:
Functions that use random numbers to simulate values are named with the
prefix of `sim_*()`. This is done to allow for functions to be quickly
identified and used through autocomplete inside of the [RStudio
IDE](https://www.rstudio.com). At a later time, the `attribute_*()` will
likely be moved to a different package.
IDE](https://www.rstudio.com) or [VS
Code](https://code.visualstudio.com/). At a later time, the
`attribute_*()` will likely be moved to a different package.

For more details, please see the [package vignettes](vignettes/):

Expand Down
2 changes: 1 addition & 1 deletion man/attribute_bijection.Rd

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

2 changes: 1 addition & 1 deletion man/attribute_classes.Rd

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

2 changes: 1 addition & 1 deletion man/attribute_inv_bijection.Rd

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

2 changes: 1 addition & 1 deletion man/sim_dina_attributes.Rd

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

2 changes: 1 addition & 1 deletion man/sim_dina_class.Rd

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

2 changes: 1 addition & 1 deletion man/sim_dina_items.Rd

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

4 changes: 2 additions & 2 deletions man/sim_eta_matrix.Rd

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

2 changes: 1 addition & 1 deletion man/sim_q_matrix.Rd

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

2 changes: 1 addition & 1 deletion man/sim_subject_attributes.Rd

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

13 changes: 4 additions & 9 deletions man/simcdm-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
@@ -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
@@ -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
27 changes: 16 additions & 11 deletions src/RcppExports.cpp
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

// sim_dina_class
arma::mat sim_dina_class(unsigned int N, unsigned int J, const arma::vec& CLASS, const arma::mat& ETA, const arma::vec& gs, const arma::vec& ss);
static SEXP _simcdm_sim_dina_class_try(SEXP NSEXP, SEXP JSEXP, SEXP CLASSSEXP, SEXP ETASEXP, SEXP gsSEXP, SEXP ssSEXP) {
Expand Down Expand Up @@ -43,7 +48,7 @@ RcppExport SEXP _simcdm_sim_dina_class(SEXP NSEXP, SEXP JSEXP, SEXP CLASSSEXP, S
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 Expand Up @@ -78,7 +83,7 @@ RcppExport SEXP _simcdm_sim_dina_attributes(SEXP alphasSEXP, SEXP QSEXP) {
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 Expand Up @@ -115,7 +120,7 @@ RcppExport SEXP _simcdm_sim_dina_items(SEXP alphasSEXP, SEXP QSEXP, SEXP ssSEXP,
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 Expand Up @@ -152,7 +157,7 @@ RcppExport SEXP _simcdm_sim_rrum_main(SEXP QSEXP, SEXP rstarSEXP, SEXP pistarSEX
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 Expand Up @@ -189,7 +194,7 @@ RcppExport SEXP _simcdm_sim_rrum_items(SEXP QSEXP, SEXP rstarSEXP, SEXP pistarSE
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 Expand Up @@ -223,7 +228,7 @@ RcppExport SEXP _simcdm_attribute_bijection(SEXP KSEXP) {
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 Expand Up @@ -258,7 +263,7 @@ RcppExport SEXP _simcdm_attribute_inv_bijection(SEXP KSEXP, SEXP CLSEXP) {
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 Expand Up @@ -293,7 +298,7 @@ RcppExport SEXP _simcdm_sim_q_matrix(SEXP JSEXP, SEXP KSEXP) {
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 Expand Up @@ -329,7 +334,7 @@ RcppExport SEXP _simcdm_sim_eta_matrix(SEXP KSEXP, SEXP JSEXP, SEXP QSEXP) {
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 Expand Up @@ -363,7 +368,7 @@ RcppExport SEXP _simcdm_attribute_classes(SEXP KSEXP) {
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 Expand Up @@ -399,7 +404,7 @@ RcppExport SEXP _simcdm_sim_subject_attributes(SEXP NSEXP, SEXP KSEXP, SEXP prob
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

0 comments on commit 5df1c2b

Please sign in to comment.