Skip to content

Commit

Permalink
changes according to CRAN comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jakwisn committed Aug 23, 2022
1 parent 1e7d1b4 commit ed28759
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# fairmodels 1.2.1
* changed link to *codecov* in `README.md`
* changed `class(x) == 'fairness_regression_object` to `inherits(x, "fairness_regression_object")` in `plot_density.R` according to CRAN comments
* changed CITATION file (added reference to the RJournal)
* fix for https://github.com/ModelOriented/fairmodels/issues/49
* fix for https://github.com/ModelOriented/fairmodels/issues/48
Expand Down
4 changes: 2 additions & 2 deletions R/plot_density.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ plot_density <- function(x, ...) {
}

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# fairmodels <img src="man/figures/logo.png" align="right" width="150"/>

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

0 comments on commit ed28759

Please sign in to comment.