Skip to content

Commit ed28759

Browse files
committed
changes according to CRAN comments
1 parent 1e7d1b4 commit ed28759

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# fairmodels 1.2.1
2+
* changed link to *codecov* in `README.md`
3+
* changed `class(x) == 'fairness_regression_object` to `inherits(x, "fairness_regression_object")` in `plot_density.R` according to CRAN comments
24
* changed CITATION file (added reference to the RJournal)
35
* fix for https://github.com/ModelOriented/fairmodels/issues/49
46
* fix for https://github.com/ModelOriented/fairmodels/issues/48

R/plot_density.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ plot_density <- function(x, ...) {
4646
}
4747

4848
limits <- c(0, 1)
49-
if (class(x) == "fairness_regression_object") limits <- NULL
49+
if (inherits(x, "fairness_regression_object")) limits <- NULL
5050

5151
probability <- protected <- label <- NULL
5252
p <- ggplot(density_data, aes(probability, protected)) +
@@ -64,7 +64,7 @@ plot_density <- function(x, ...) {
6464
ggtitle("Density plot") +
6565
facet_grid(rows = vars(label))
6666

67-
if (class(x) == "fairness_regression_object") {
67+
if (inherits(x, "fairness_regression_object")) {
6868
p <- p + xlab("predicted values")
6969
}
7070

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# fairmodels <img src="man/figures/logo.png" align="right" width="150"/>
22

33
<!-- badges: start -->
4-
[![Codecov test coverage](https://codecov.io/gh/ModelOriented/fairmodels/branch/master/graph/badge.svg)](https://codecov.io/gh/ModelOriented/fairmodels?branch=master)
4+
[![Codecov test coverage](https://codecov.io/gh/ModelOriented/fairmodels/branch/master/graph/badge.svg)](https://app.codecov.io/gh/ModelOriented/fairmodels?branch=master)
55
[![R build status](https://github.com/ModelOriented/fairmodels/workflows/R-CMD-check/badge.svg)](https://github.com/ModelOriented/fairmodels/actions)
66
[![CRAN](https://www.r-pkg.org/badges/version/fairmodels)](https://cran.r-project.org/package=fairmodels)
77
![Downloads](https://cranlogs.r-pkg.org/badges/fairmodels)

0 commit comments

Comments
 (0)