diff --git a/.Rbuildignore b/.Rbuildignore index ba40c04..5b3338d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,3 +2,8 @@ ^\.Rproj\.user$ ^.travis.yml$ ^\.travis\.yml$ +.gitignore +.travis.yml +.Rproj.user +.git +.github diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml new file mode 100644 index 0000000..a3ac618 --- /dev/null +++ b/.github/workflows/R-CMD-check.yml @@ -0,0 +1,49 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +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: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/DESCRIPTION b/DESCRIPTION index 2fabf3b..84d82db 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,13 @@ Package: pesel Type: Package Title: Automatic Estimation of Number of Principal Components in PCA -Version: 0.7.4 -Date: 2021-06-13 +Version: 0.7.5 +Date: 2023-08-14 Author: Piotr Sobczyk, Julie Josse, Malgorzata Bogdan Maintainer: Piotr Sobczyk Description: Automatic estimation of number of principal components in PCA with PEnalized SEmi-integrated Likelihood (PESEL). See Piotr Sobczyk, Malgorzata Bogdan, Julie Josse - 'Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood' + "Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood" (2017) . License: GPL-3 Encoding: UTF-8 @@ -18,5 +18,4 @@ Depends: Imports: stats, graphics -LazyData: TRUE -RoxygenNote: 7.1.1 +RoxygenNote: 7.2.3 diff --git a/NAMESPACE b/NAMESPACE index 2af8a83..3e77197 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,3 +8,4 @@ export(pesel_homogeneous) importFrom(graphics,plot) importFrom(graphics,points) importFrom(stats,cov) +importFrom(utils,head) diff --git a/R/pesel.R b/R/pesel.R index 9231d08..2f436d7 100644 --- a/R/pesel.R +++ b/R/pesel.R @@ -137,6 +137,7 @@ pesel <- function(X, npc.min = 0, npc.max = 10, prior = NULL, scale = TRUE, #' @param posterior a boolean, if TRUE (default value) then posterior probablities are plotted #' otherwise values of PeSeL criterion are plotted #' @param ... Further arguments to be passed to or from other methods. They are ignored in this function. +#' @return No return value, called for side effects #' @export #' @keywords internal plot.pesel.result <- function(x, posterior = TRUE, ...){ @@ -158,6 +159,7 @@ pesel <- function(X, npc.min = 0, npc.max = 10, prior = NULL, scale = TRUE, #' #' @param x pesel.result class object #' @param ... Further arguments to be passed to or from other methods. They are ignored in this function. +#' @return No return value, called for side effects #' @export #' @keywords internal print.pesel.result <- function(x,...){ diff --git a/R/pesel_package.R b/R/pesel_package.R index 28e5984..1bf8972 100644 --- a/R/pesel_package.R +++ b/R/pesel_package.R @@ -3,11 +3,12 @@ #' @description Automatic estimation of number of principal components in PCA #' with PEnalized SEmi-integrated Likelihood (PESEL). #' -#' @details Version: 0.7.4 +#' @details Version: 0.7.5 #' @docType package #' @name pesel-package #' @importFrom stats cov #' @importFrom graphics plot points +#' @importFrom utils head #' @author{ Piotr Sobczyk, #' Julie Josse, #' Malgorzata Bogdan @@ -15,7 +16,7 @@ #' Maintainer: Piotr Sobczyk \email{pj.sobczyk@@gmail.com} #' } #' @references Piotr Sobczyk, Malgorzata Bogdan, Julie Josse -#' \emph{Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood}, +#' "Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood", #' Journal of Computational and Graphical Statistics 2017 #' #' @examples diff --git a/README.md b/README.md index bf5378a..33e2d60 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/pesel)](http://cran.r-project.org/package=pesel) -[![Downloads](http://cranlogs.r-pkg.org/badges/pesel)](http://cran.rstudio.com/package=pesel) -[![Build Status](https://api.travis-ci.org/psobczyk/pesel.png)](https://travis-ci.org/psobczyk/pesel) +[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/pesel)](https://cran.r-project.org/web/packages/pesel/index.html) +[![Downloads](http://cranlogs.r-pkg.org/badges/pesel)](http://cran.rstudio.com/package=pesel) +[![R build status](https://github.com/psobczyk/pesel/workflows/R-CMD-check/badge.svg)](https://github.com/psobczyk/pesel/actions?query=workflow%3AR-CMD-check) [](http://www.ideal.rwth-aachen.de/) ------------- diff --git a/man/pesel-package.Rd b/man/pesel-package.Rd index 80fbff1..fec1923 100644 --- a/man/pesel-package.Rd +++ b/man/pesel-package.Rd @@ -9,7 +9,7 @@ Automatic estimation of number of principal components in PCA with PEnalized SEmi-integrated Likelihood (PESEL). } \details{ -Version: 0.7.4 +Version: 0.7.5 } \examples{ # EXAMPLE 1 - noise @@ -31,7 +31,7 @@ pesel(X) } \references{ Piotr Sobczyk, Malgorzata Bogdan, Julie Josse -\emph{Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood}, +"Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood", Journal of Computational and Graphical Statistics 2017 } \author{ diff --git a/man/plot.pesel.result.Rd b/man/plot.pesel.result.Rd index fdf8a5c..5c37cdb 100644 --- a/man/plot.pesel.result.Rd +++ b/man/plot.pesel.result.Rd @@ -14,6 +14,9 @@ otherwise values of PeSeL criterion are plotted} \item{...}{Further arguments to be passed to or from other methods. They are ignored in this function.} } +\value{ +No return value, called for side effects +} \description{ Plot pesel.result class object } diff --git a/man/print.pesel.result.Rd b/man/print.pesel.result.Rd index d903acf..20e70d4 100644 --- a/man/print.pesel.result.Rd +++ b/man/print.pesel.result.Rd @@ -11,6 +11,9 @@ \item{...}{Further arguments to be passed to or from other methods. They are ignored in this function.} } +\value{ +No return value, called for side effects +} \description{ Print pesel.result class object } diff --git a/pesel.Rproj b/pesel.Rproj index 526ad2d..42b95bd 100644 --- a/pesel.Rproj +++ b/pesel.Rproj @@ -18,4 +18,5 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageCheckArgs: --as-cran PackageRoxygenize: rd,collate,namespace,vignette