Skip to content

Commit

Permalink
Fix vignette error
Browse files Browse the repository at this point in the history
  • Loading branch information
haziqj committed Apr 1, 2024
1 parent bec10df commit abfe559
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 7 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: iprior
Title: Regression Modelling using I-Priors
Version: 0.7.3.9001
Version: 0.7.4
Authors@R: person("Haziq", "Jamil", email = "haziq.jamil@gmail.com",
role = c("aut", "cre"))
Encoding: UTF-8
Expand Down
3 changes: 2 additions & 1 deletion R/Kernel_loader.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#' should be used for training, and the remaining used for testing.
#' @param test.samp (Optional) Similar to \code{train.samp}, but on test samples
#' instead.
#' @param intercept (Optional) Intercept for response variables.
#'
#' @return An \code{ipriorKernel} object which contains the relevant material to
#' be passed to the \code{iprior} function for model fitting.
Expand Down Expand Up @@ -205,7 +206,7 @@ if (as.numeric(nystrom[1]) > 0 & as.numeric(nystrom[1]) != n) {
if (!is.null(nys.seed)) set.seed(nys.seed)
nys.samp <- sample(seq_along(y))
}

y.tmp <- y[nys.samp]
mostattributes(y.tmp) <- attributes(y)
y <- y.tmp
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<!-- badges: start -->
[![R-CMD-check](https://github.com/haziqj/iprior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/haziqj/iprior/actions/workflows/R-CMD-check.yaml)
<!-- [![Build Status](https://travis-ci.org/haziqj/iprior.svg?branch=master)](https://travis-ci.org/haziqj/iprior)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/haziqj/iprior?branch=master&svg=true)](https://ci.appveyor.com/project/haziqj/iprior)
[![Coverage Status](https://img.shields.io/codecov/c/github/haziqj/iprior/master.svg)](https://codecov.io/gh/haziqj/iprior) -->
[![test-coverage](https://github.com/haziqj/iprior/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/haziqj/iprior/actions/workflows/test-coverage.yaml)
[![CRAN_Status_Badge_version_ago](http://www.r-pkg.org/badges/version-ago/iprior)](https://cran.r-project.org/package=iprior)
[![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/iprior)](https://cran.r-project.org/package=iprior)
<!-- badges: end -->


<!-- [![Build Status](https://travis-ci.org/haziqj/iprior.svg?branch=master)](https://travis-ci.org/haziqj/iprior)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/haziqj/iprior?branch=master&svg=true)](https://ci.appveyor.com/project/haziqj/iprior)
[![Coverage Status](https://img.shields.io/codecov/c/github/haziqj/iprior/master.svg)](https://codecov.io/gh/haziqj/iprior) -->

Based on the manuscript entitled "Regression and Classification with I-priors" by Wicher Bergsma (2018, [arXiv:1707.00274](https://arxiv.org/abs/1707.00274)).
In a general regression setting, priors can be assigned to the regression function in a vector space framework, and the posterior estimate of the regression function obtained.
Expand Down
2 changes: 2 additions & 0 deletions man/kernL.Rd

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

Binary file added vignettes/iprior_paper.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion vignettes/tecator.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: "Haziq Jamil"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Cross-validation analysis of the Tecator data set}
%\VignetteIndexEntry{Regression with a functional covariate: Cross-validation analysis of the Tecator data set}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
%\VignetteDepends{iprior,caret}
Expand Down

0 comments on commit abfe559

Please sign in to comment.