Skip to content

Commit

Permalink
Merge pull request #1 from louisaslett/fix-for-cran
Browse files Browse the repository at this point in the history
Fixes for CRAN notification of new issues in R-devel.  Merging ready for CRAN submission.
  • Loading branch information
louisaslett authored Sep 14, 2024
2 parents 43ff41d + c72e295 commit 379b672
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
^.*\.Rproj$
^\.Rproj\.user$
^cran-comments\.md$
^revdep$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description: Functions to perform Bayesian inference on absorption time data for
<https://www.louisaslett.com/PhD_Thesis.pdf> are provided.
URL: https://www.louisaslett.com/PhaseType/, https://github.com/louisaslett/PhaseType
BugReports: https://github.com/louisaslett/PhaseType/issues
Version: 0.2.1
Version: 0.3.0
Maintainer: Louis Aslett <[email protected]>
Authors@R: c(person("Louis", "Aslett", email = "[email protected]",
role = c("aut", "cre")),
Expand Down
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
PhaseType 0.3.0
===============

* Fix requested by CRAN to change Calloc and Free C calls to use R_ versions,
so that STRICT_R_HEADERS=1 compiles ok (to be default from R 4.5.0)

PhaseType 0.2.0
===============

Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# PhaseType R package :package:
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![license](http://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
[![metacran version](http://www.r-pkg.org/badges/version/PhaseType)](https://CRAN.R-project.org/package=PhaseType)
[![metacran downloads](http://cranlogs.r-pkg.org/badges/PhaseType?color=brightgreen)](https://CRAN.R-project.org/package=PhaseType)
<!--[CRAN check result](https://cran.r-project.org/web/checks/check_results_PhaseType.html)-->
[![license](https://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
[![metacran version](https://www.r-pkg.org/badges/version/PhaseType)](https://cran.r-project.org/package=PhaseType)
[![metacran downloads](https://cranlogs.r-pkg.org/badges/grand-total/PhaseType)](https://cran.r-project.org/package=PhaseType)
[![PhaseType status badge](https://louisaslett.r-universe.dev/badges/PhaseType)](https://louisaslett.r-universe.dev/PhaseType)

This is a package for working with Phase-type (PHT) distributions in the R programming language.
The entire of the MCMC portion of the code has been written in optimised C for higher performance and very low memory use, whilst being easy to call from wrapper R functions.
Expand Down Expand Up @@ -60,10 +60,13 @@ install.packages("PhaseType")

## Install development version (not recommended)

Installing directly from [GitHub](https://github.com) is not supported by the
`install.packages` command. You could use the
[devtools](https://CRAN.R-project.org/package=devtools) package
to install the development version if desired.
You can get the very latest version from R-universe:

```r
install.packages("PhaseType", repos = c("https://louisaslett.r-universe.dev", "https://cloud.r-project.org"))
```

Installing directly from [GitHub](https://github.com) is not supported by the `install.packages` command, but if you wish to compile from source then you could use the [devtools](https://CRAN.R-project.org/package=devtools) package:

```r
install.packages("remotes")
Expand All @@ -77,7 +80,7 @@ so historic source can be downloaded from there.

## Citation

If you use this software, please cite the following:
If you use this software, please use the following citation:

Aslett, L. J. M. (2012), MCMC for Inference on Phase-type and Masked System Lifetime Models, PhD thesis, Trinity College Dublin.

Expand Down
12 changes: 12 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## R CMD check results

0 errors | 0 warnings | 0 notes

* This release is a fix requested by Kurt Hornik for when compilation with STRICT_R_HEADERS is set to 1, which is due to become default in R 4.5.0.

## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
7 changes: 7 additions & 0 deletions revdep/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
checks
library
checks.noindex
library.noindex
cloud.noindex
data.sqlite
*.html
24 changes: 24 additions & 0 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Platform

|field |value |
|:--------|:---------------------------------------------------------------------------------------------------|
|version |R version 4.4.1 (2024-06-14) |
|os |macOS Sonoma 14.6.1 |
|system |aarch64, darwin20 |
|ui |RStudio |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |Europe/London |
|date |2024-09-14 |
|rstudio |2024.04.2+764 Chocolate Cosmos (desktop) |
|pandoc |3.1.11 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown) |

# Dependencies

|package |old |new |Δ |
|:---------|:-----|:-----|:--|
|PhaseType |0.2.1 |0.3.0 |* |

# Revdeps

7 changes: 7 additions & 0 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

1 change: 1 addition & 0 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
1 change: 1 addition & 0 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
4 changes: 2 additions & 2 deletions src/utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ void LJMA_LAPACKspace(int *n) {
F77_CALL(dgetri)(n, NULL, n, NULL, &work, &lwork, &info);
if((int) work > LJMA_LAPACK_lwork) LJMA_LAPACK_lwork = (int) work;
//LJMA_LAPACK_work = (double *) R_alloc(LJMA_LAPACK_lwork, sizeof(double));
LJMA_LAPACK_work = (double *) Calloc(LJMA_LAPACK_lwork, double);
LJMA_LAPACK_work = (double *) R_Calloc(LJMA_LAPACK_lwork, double);
}
void LJMA_LAPACKspaceFree(void) {
Free(LJMA_LAPACK_work);
R_Free(LJMA_LAPACK_work);
}


Expand Down

0 comments on commit 379b672

Please sign in to comment.