diff --git a/.Rbuildignore b/.Rbuildignore index c7b8f85..4c1d258 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,10 +1,9 @@ ^.*\.Rproj$ ^\.Rproj\.user$ -^\.travis\.yml ^README\.Rmd$ ^README\.md$ ^desktop.ini$ -^\.travis\.yml$ ^biometrics\.csl$ ^codecov\.yml$ ^CRAN-RELEASE$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..e7bad16 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,84 @@ +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: windows-latest, r: 'release'} + - {os: macOS-latest, r: 'release'} + - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@v1 + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + shell: Rscript {0} + + - name: Cache R packages + if: runner.os != 'Windows' + uses: actions/cache@v2 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + while read -r cmd + do + eval sudo $cmd + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + + - name: Install dependencies + run: | + remotes::install_deps(dependencies = TRUE) + remotes::install_cran("rcmdcheck") + shell: Rscript {0} + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d327b47..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: r -r: - - oldrel - - release - - devel - - -r_github_packages: - - jimhester/lintr - - -after_success: - - R CMD INSTALL $PKG_TARBALL - - Rscript -e 'covr::codecov()' - - Rscript -e 'lintr::lint_package()' diff --git a/CRAN-RELEASE b/CRAN-RELEASE deleted file mode 100644 index ef929e6..0000000 --- a/CRAN-RELEASE +++ /dev/null @@ -1,2 +0,0 @@ -This package was submitted to CRAN on 2019-07-25. -Once it is accepted, delete this file and tag the release (commit 1c26593277). diff --git a/DESCRIPTION b/DESCRIPTION index af9b543..073bc46 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: SimCorMultRes Type: Package Title: Simulates Correlated Multinomial Responses Description: Simulates correlated multinomial responses conditional on a marginal model specification. -Version: 1.7.2 +Version: 1.7.3 Depends: R(>= 2.15.0) Imports: evd, diff --git a/README.Rmd b/README.Rmd index d48282b..dd8d4aa 100644 --- a/README.Rmd +++ b/README.Rmd @@ -31,7 +31,7 @@ knitr::opts_chunk$set( # SimCorMultRes: Simulates Correlated Multinomial Responses [![Github version](`r paste0("https://img.shields.io/badge/GitHub%20-", as.vector(read.dcf('DESCRIPTION')[, 'Version']),"-orange.svg")`)]("commits/master") -[![Travis-CI Build Status](https://travis-ci.org/AnestisTouloumis/SimCorMultRes.svg?branch=master)](https://travis-ci.org/AnestisTouloumis/SimCorMultRes) +[![R-CMD-check](https://github.com/AnestisTouloumis/SimCorMultRes/workflows/R-CMD-check/badge.svg)](https://github.com/AnestisTouloumis/SimCorMultRes/actions) [![Project Status: Active The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![Codecov test coverage](https://codecov.io/gh/AnestisTouloumis/SimCorMultRes/branch/master/graph/badge.svg)](https://codecov.io/gh/AnestisTouloumis/SimCorMultRes?branch=master) diff --git a/README.md b/README.md index 2b84ebe..070710b 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,8 @@ # SimCorMultRes: Simulates Correlated Multinomial Responses [![Github -version](https://img.shields.io/badge/GitHub%20-1.7.2-orange.svg)](%22commits/master%22) -[![Travis-CI Build -Status](https://travis-ci.org/AnestisTouloumis/SimCorMultRes.svg?branch=master)](https://travis-ci.org/AnestisTouloumis/SimCorMultRes) +version](https://img.shields.io/badge/GitHub%20-1.7.3-orange.svg)](%22commits/master%22) +[![R-CMD-check](https://github.com/AnestisTouloumis/SimCorMultRes/workflows/R-CMD-check/badge.svg)](https://github.com/AnestisTouloumis/SimCorMultRes/actions) [![Project Status: Active The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) @@ -31,7 +30,7 @@ install.packages("SimCorMultRes") The source code for the release version of `SimCorMultRes` is available on CRAN at: - - +- Or you can install the development version of `SimCorMultRes`: @@ -43,7 +42,7 @@ devtools::install_github("AnestisTouloumis/SimCorMultRes") The source code for the development version of `SimCorMultRes` is available on github at: - - +- To use `SimCorMultRes`, you should load the package as follows: @@ -60,20 +59,20 @@ regression model for continuous random vectors as proposed by Touloumis There are five core functions: - - `rbin` to simulate correlated binary responses, - - `rmult.bcl` to simulate correlated nominal multinomial responses, - - `rmult.acl` to simulate correlated ordinal responses under a +- `rbin` to simulate correlated binary responses, +- `rmult.bcl` to simulate correlated nominal multinomial responses, +- `rmult.acl` to simulate correlated ordinal responses under a marginal adjacent-category logit model, - - `rmult.clm` to simulate correlated ordinal responses under a +- `rmult.clm` to simulate correlated ordinal responses under a marginal cumulative link model, - - `rmult.clm` to simulate correlated ordinal responses under a +- `rmult.clm` to simulate correlated ordinal responses under a marginal continuation-ratio link model. There are also two utility functions: - - `rnorta` for simulating continuous or discrete random vectors with +- `rnorta` for simulating continuous or discrete random vectors with prescribed marginal distributions using the NORTA method, - - `rsmvnorm` for simulating continuous random vectors from a +- `rsmvnorm` for simulating continuous random vectors from a multivariate normal distribution. ## Example @@ -113,34 +112,32 @@ browseVignettes("SimCorMultRes") ## How to cite -``` -To cite R package SimCorMultRes in publications, please use: + To cite R package SimCorMultRes in publications, please use: - Touloumis, A. (2016). Simulating Correlated Binary and Multinomial - Responses under Marginal Model Specification: The SimCorMultRes - Package. The R Journal 8:2, 79-91. + Touloumis, A. (2016). Simulating Correlated Binary and Multinomial + Responses under Marginal Model Specification: The SimCorMultRes + Package. The R Journal 8:2, 79-91. -A BibTeX entry for LaTeX users is + A BibTeX entry for LaTeX users is - @Article{, - title = {Simulating Correlated Binary and Multinomial Responses under - Marginal Model Specification: The SimCorMultRes Package}, - author = {Anestis Touloumis}, - year = {2016}, - journal = {The R Journal}, - volume = {8}, - number = {2}, - pages = {79-91}, - url = {https://journal.r-project.org/archive/2016/RJ-2016-034/index.html}, - } -``` + @Article{, + title = {Simulating Correlated Binary and Multinomial Responses under + Marginal Model Specification: The SimCorMultRes Package}, + author = {Anestis Touloumis}, + year = {2016}, + journal = {The R Journal}, + volume = {8}, + number = {2}, + pages = {79-91}, + url = {https://journal.r-project.org/archive/2016/RJ-2016-034/index.html}, + } # References -
+
-
+
Touloumis, A. (2016) Simulating Correlated Binary and Multinomial Responses under Marginal Model Specification: The SimCorMultRes Package. diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 7ba4685..c317400 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -1,8 +1,9 @@ \name{NEWS} \title{NEWS file for the \pkg{SimCorMultRes} package} -\section{Changes in Version 1.7.2 (2019-11-02)}{ +\section{Changes in Version 1.7.3 (2021-01-22)}{ \itemize{ + \item{Migrating from travis-ci to github actions.} \item{Created NEWS.Rd.} \item{Fixed ORCID in DESCRIPTION.} }