Skip to content

Commit d5fdac6

Browse files
committed
add actions, remove travis/appveyor
1 parent 8a716e9 commit d5fdac6

File tree

6 files changed

+164
-153
lines changed

6 files changed

+164
-153
lines changed

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: R-CMD-check
10+
11+
jobs:
12+
R-CMD-check:
13+
runs-on: ${{ matrix.config.os }}
14+
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
config:
21+
- {os: macOS-latest, r: 'devel'}
22+
- {os: macOS-latest, r: 'release'}
23+
- {os: macOS-latest, r: '3.6'}
24+
- {os: windows-latest, r: 'release'}
25+
- {os: windows-latest, r: '3.6'}
26+
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27+
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28+
29+
env:
30+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
31+
RSPM: ${{ matrix.config.rspm }}
32+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- uses: r-lib/actions/setup-r@master
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
41+
- uses: r-lib/actions/setup-pandoc@master
42+
43+
- name: Query dependencies
44+
run: |
45+
install.packages('remotes')
46+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
47+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
48+
shell: Rscript {0}
49+
50+
- name: Cache R packages
51+
if: runner.os != 'Windows'
52+
uses: actions/cache@v1
53+
with:
54+
path: ${{ env.R_LIBS_USER }}
55+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
56+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
57+
58+
- name: Install system dependencies
59+
if: runner.os == 'Linux'
60+
env:
61+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
62+
run: |
63+
Rscript -e "remotes::install_github('r-hub/sysreqs')"
64+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
65+
sudo -s eval "$sysreqs"
66+
67+
- name: Install dependencies
68+
run: |
69+
remotes::install_deps(dependencies = TRUE)
70+
remotes::install_cran("rcmdcheck")
71+
shell: Rscript {0}
72+
73+
- name: Session info
74+
run: |
75+
options(width = 100)
76+
pkgs <- installed.packages()[, "Package"]
77+
sessioninfo::session_info(pkgs, include_base = TRUE)
78+
shell: Rscript {0}
79+
80+
- name: Check
81+
env:
82+
_R_CHECK_CRAN_INCOMING_: false
83+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
84+
shell: Rscript {0}
85+
86+
- name: Show testthat output
87+
if: always()
88+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
89+
shell: bash
90+
91+
- name: Upload check results
92+
if: failure()
93+
uses: actions/upload-artifact@master
94+
with:
95+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
96+
path: check
97+
98+
- name: Test coverage
99+
run: covr::codecov()
100+
shell: Rscript {0}

.travis.yml

-29
This file was deleted.

README.Rmd

+3-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ knitr::opts_chunk$set(
1313
```
1414

1515
<!-- badges: start -->
16-
[![Travis build status](https://travis-ci.org/m-clark/confusionMatrix.svg?branch=master)](https://travis-ci.org/m-clark/confusionMatrix)
17-
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/m-clark/confusionMatrix?branch=master&svg=true)](https://ci.appveyor.com/project/m-clark/confusionMatrix)
16+
17+
[![R build status](https://github.com/m-clark/confusionMatrix/workflows/R-CMD-check/badge.svg)](https://github.com/m-clark/confusionMatrix/actions)
1818
[![Codecov test coverage](https://codecov.io/gh/m-clark/confusionMatrix/branch/master/graph/badge.svg)](https://codecov.io/gh/m-clark/confusionMatrix?branch=master)
1919
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-experimental-blue.svg)](https://www.tidyverse.org/lifecycle/#experimental)
20-
<!-- <a href="https://github.com/m-clark/confusionMatrix" alt="Miscellaneous Shenanigans"> -->
21-
<!-- <img src="https://img.shields.io/badge/Status-Meh-ff5500.svg?colorA=00aaff&longCache=true&style=for-the-badge" width=20.5%/></a> -->
2220

23-
<!-- badges: end -->
21+
<!-- badges: end -->
2422

2523

2624
# confusionMatrix

README.md

+60-67
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11

22
<!-- badges: start -->
33

4-
[![Travis build
5-
status](https://travis-ci.org/m-clark/confusionMatrix.svg?branch=master)](https://travis-ci.org/m-clark/confusionMatrix)
6-
[![AppVeyor Build
7-
Status](https://ci.appveyor.com/api/projects/status/github/m-clark/confusionMatrix?branch=master&svg=true)](https://ci.appveyor.com/project/m-clark/confusionMatrix)
4+
[![R build
5+
status](https://github.com/m-clark/confusionMatrix/workflows/R-CMD-check/badge.svg)](https://github.com/m-clark/confusionMatrix/actions)
86
[![Codecov test
97
coverage](https://codecov.io/gh/m-clark/confusionMatrix/branch/master/graph/badge.svg)](https://codecov.io/gh/m-clark/confusionMatrix?branch=master)
108
[![Lifecycle:
119
maturing](https://img.shields.io/badge/lifecycle-experimental-blue.svg)](https://www.tidyverse.org/lifecycle/#experimental)
12-
<!-- <a href="https://github.com/m-clark/confusionMatrix" alt="Miscellaneous Shenanigans"> -->
13-
<!-- <img src="https://img.shields.io/badge/Status-Meh-ff5500.svg?colorA=00aaff&longCache=true&style=for-the-badge" width=20.5%/></a> -->
1410

1511
<!-- badges: end -->
1612

@@ -41,27 +37,26 @@ result
4137

4238
$Accuracy
4339
# A tibble: 1 x 6
44-
Accuracy `Accuracy LL` `Accuracy UL` `Accuracy Guess~ `Accuracy P-val~
40+
Accuracy `Accuracy LL` `Accuracy UL` `Accuracy Guess `Accuracy P-val
4541
<dbl> <dbl> <dbl> <dbl> <dbl>
46-
1 0.524 0.460 0.587 0.64 1.000
47-
# ... with 1 more variable: `Frequency Table` <list>
42+
1 0.596 0.532 0.657 0.692 0.999
43+
# with 1 more variable: `Frequency Table` <list>
4844

4945
$Other
5046
# A tibble: 1 x 19
51-
Positive N `N Positive` `N Negative` `Sensitivity/Re~
52-
<chr> <int> <int> <int> <dbl>
53-
1 a 250 90 160 0.344
54-
# ... with 14 more variables: `Specificity/TNR` <dbl>,
55-
# `PPV/Precision` <dbl>, NPV <dbl>, `F1/Dice` <dbl>, Prevalence <dbl>,
56-
# `Detection Rate` <dbl>, `Detection Prevalence` <dbl>, `Balanced
57-
# Accuracy` <dbl>, FDR <dbl>, FOR <dbl>, `FPR/Fallout` <dbl>, FNR <dbl>,
58-
# `D Prime` <dbl>, AUC <dbl>
47+
Positive N `N Positive` `N Negative` `Sensitivity/Re… `Specificity/TN…
48+
<chr> <int> <int> <int> <dbl> <dbl>
49+
1 a 250 77 173 0.338 0.711
50+
# … with 13 more variables: `PPV/Precision` <dbl>, NPV <dbl>, `F1/Dice` <dbl>,
51+
# Prevalence <dbl>, `Detection Rate` <dbl>, `Detection Prevalence` <dbl>,
52+
# `Balanced Accuracy` <dbl>, FDR <dbl>, FOR <dbl>, `FPR/Fallout` <dbl>,
53+
# FNR <dbl>, `D Prime` <dbl>, AUC <dbl>
5954

6055
$`Association and Agreement`
6156
# A tibble: 1 x 6
62-
Kappa `Adjusted Rand` Yule Phi Peirce Jaccard
63-
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
64-
1 -0.0305 -0.00699 -0.0663 -0.0305 0.364 0.457
57+
Kappa `Adjusted Rand` Yule Phi Peirce Jaccard
58+
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
59+
1 0.0488 0.0116 0.113 0.0488 0.0486 0.549
6560

6661
``` r
6762
result$Accuracy$`Frequency Table`
@@ -70,8 +65,8 @@ result$Accuracy$`Frequency Table`
7065
[[1]]
7166
Target
7267
Predicted a b
73-
a 31 60
74-
b 59 100
68+
a 26 50
69+
b 51 123
7570

7671
``` r
7772
result = confusion_matrix(
@@ -83,51 +78,49 @@ result = confusion_matrix(
8378
result
8479
```
8580

86-
```
87-
$Accuracy
88-
# A tibble: 5 x 2
89-
Statistic Value
90-
<chr> <dbl>
91-
1 Accuracy 0.524
92-
2 Accuracy LL 0.460
93-
3 Accuracy UL 0.587
94-
4 Accuracy Guessing 0.64
95-
5 Accuracy P-value 1.000
96-
97-
$Other
98-
# A tibble: 18 x 3
99-
Positive Statistic Value
100-
<chr> <chr> <dbl>
101-
1 a N 250
102-
2 a N Positive 90
103-
3 a N Negative 160
104-
4 a Sensitivity/Recall/TPR 0.344
105-
5 a Specificity/TNR 0.625
106-
6 a PPV/Precision 0.341
107-
7 a NPV 0.629
108-
8 a F1/Dice 0.343
109-
9 a Prevalence 0.36
110-
10 a Detection Rate 0.124
111-
11 a Detection Prevalence 0.364
112-
12 a Balanced Accuracy 0.485
113-
13 a FDR 0.659
114-
14 a FOR 0.371
115-
15 a FPR/Fallout 0.375
116-
16 a FNR 0.656
117-
17 a D Prime -0.0817
118-
18 a AUC 0.523
119-
120-
$`Association and Agreement`
121-
# A tibble: 6 x 2
122-
Statistic Value
123-
<chr> <dbl>
124-
1 Kappa -0.0305
125-
2 Adjusted Rand -0.00699
126-
3 Yule -0.0663
127-
4 Phi -0.0305
128-
5 Peirce 0.364
129-
6 Jaccard 0.457
130-
```
81+
$Accuracy
82+
# A tibble: 5 x 2
83+
Statistic Value
84+
<chr> <dbl>
85+
1 Accuracy 0.596
86+
2 Accuracy LL 0.532
87+
3 Accuracy UL 0.657
88+
4 Accuracy Guessing 0.692
89+
5 Accuracy P-value 0.999
90+
91+
$Other
92+
# A tibble: 18 x 3
93+
Positive Statistic Value
94+
<chr> <chr> <dbl>
95+
1 a N 250
96+
2 a N Positive 77
97+
3 a N Negative 173
98+
4 a Sensitivity/Recall/TPR 0.338
99+
5 a Specificity/TNR 0.711
100+
6 a PPV/Precision 0.342
101+
7 a NPV 0.707
102+
8 a F1/Dice 0.340
103+
9 a Prevalence 0.308
104+
10 a Detection Rate 0.104
105+
11 a Detection Prevalence 0.304
106+
12 a Balanced Accuracy 0.524
107+
13 a FDR 0.658
108+
14 a FOR 0.293
109+
15 a FPR/Fallout 0.289
110+
16 a FNR 0.662
111+
17 a D Prime 0.137
112+
18 a AUC 0.538
113+
114+
$`Association and Agreement`
115+
# A tibble: 6 x 2
116+
Statistic Value
117+
<chr> <dbl>
118+
1 Kappa 0.0488
119+
2 Adjusted Rand 0.0116
120+
3 Yule 0.113
121+
4 Phi 0.0488
122+
5 Peirce 0.0486
123+
6 Jaccard 0.549
131124

132125
### Installation
133126

appveyor.yml

-52
This file was deleted.

0 commit comments

Comments
 (0)