Skip to content

Commit

Permalink
CRAN release (#36)
Browse files Browse the repository at this point in the history
* Catch doc NOTES caught by WinBuilder

* typo

* Throttle to single thread in tests

* 0.1.0

* CRAN comments and submission

* Also control magick nthreads

- OpenMP everywhere...

* roxygen2 ver

* Quote package names

* typo

* tweak

* Resubmit
  • Loading branch information
grantmcdermott committed Dec 14, 2023
1 parent f22e541 commit e36ab94
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
^\.github$
^TESTING$
^.vscode$
^cran-comments.md
^CRAN-SUBMISSION$
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.1.0
Date: 2023-12-13 22:31:45 UTC
SHA: e497f7677d32404a1aed99860c8e30244ad8038b
22 changes: 12 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Package: ggfixest
Title: Dedicated ggplot2 methods for fixest objects
Version: 0.0.3.9001
Title: Dedicated 'ggplot2' Methods for 'fixest' Objects
Version: 0.1.0
Date: 2023-12-12
Authors@R:
c(person(given = "Grant",
family = "McDermott",
Expand All @@ -12,16 +13,16 @@ Authors@R:
role = "ctb",
email = "laurent.berge@u-bordeaux.fr")
)
Description: Provides ggplot2 equivalents of fixest::coefplot and fixest::iplot,
for producing nice coefficient plots and interactions plots. Enables some
Description: Provides 'ggplot2' equivalents of fixest::coefplot() and fixest::iplot(),
for producing nice coefficient plots and interaction plots. Enables some
additional functionality and convenience features, including grouped
multi-fixest object faceting and programatic updating of existing plots
multi-'fixest' object faceting and programmatic updates to existing plots
(e.g., themes and aesthetics).
License: GPL-3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3.9000
RoxygenNote: 7.2.3
URL: http://grantmcdermott.com/ggfixest/
BugReports: https://github.com/grantmcdermott/ggfixest/issues
Depends:
Expand All @@ -31,16 +32,17 @@ Imports:
dreamerr,
ggh4x,
scales,
utils,
marginaleffects (>= 0.10.0),
stats
stats,
utils
Suggests:
knitr,
remotes,
rmarkdown,
tinytest (>= 1.4.1),
tinysnapshot (>= 0.0.3),
magick,
rsvg,
svglite,
fontquiver
fontquiver,
data.table
VignetteBuilder: knitr
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ggfixest 0.0.3.9001 (development version)
# ggfixest 0.1.0

First CRAN release!

## New features

Expand Down
2 changes: 1 addition & 1 deletion R/iplot_data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Internal function for grabbing and preparing iplot data
#' @title Internal function for grabbing and preparing iplot data.
#'
#' @md
#' @description Grabs the underlying data used to construct `fixest::iplot`,
Expand Down
11 changes: 9 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ knitr::opts_chunk$set(
# ggfixest

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/ggfixest)](https://CRAN.R-project.org/package=ggfixest)
[![R-universe status badge](https://grantmcdermott.r-universe.dev/badges/ggfixest)](https://grantmcdermott.r-universe.dev)
[![R-CMD-check](https://github.com/grantmcdermott/ggfixest/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/grantmcdermott/ggfixest/actions/workflows/R-CMD-check.yaml)
[![Docs](https://img.shields.io/badge/docs-homepage-blue.svg)](https://grantmcdermott.com/ggfixest/index.html)
Expand All @@ -35,7 +36,13 @@ plots---with minimal effort and scope for further customization.

## Installation

The package is not yet on CRAN, but can be installed from R-universe:
The stable version of **ggfixest** is available on CRAN.

``` r
install.packages("ggfixest")
```

Or, you can grab the latest development version from R-universe.

``` r
install.packages("ggfixest", repos = "https://grantmcdermott.r-universe.dev")
Expand Down Expand Up @@ -79,7 +86,7 @@ ggcoefplot(est) ## this package
The above plot call and output should look very familiar to regular **fixest**
users. Like its base equivalent, `ggcoefplot` can be heavily customized and
contains various shortcuts for common operations. For example, we can use regex
the control the coefficient grouping logic.
to control the coefficient grouping logic.

```{r coefplot2, message=FALSE}
ggcoefplot(est, group = list(Sepal = "^^Sepal.", Species = "^^Species"))
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

<!-- badges: start -->

[![CRAN
status](https://www.r-pkg.org/badges/version/ggfixest)](https://CRAN.R-project.org/package=ggfixest)
[![R-universe status
badge](https://grantmcdermott.r-universe.dev/badges/ggfixest)](https://grantmcdermott.r-universe.dev)
[![R-CMD-check](https://github.com/grantmcdermott/ggfixest/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/grantmcdermott/ggfixest/actions/workflows/R-CMD-check.yaml)
Expand All @@ -25,7 +27,13 @@ minimal effort and scope for further customization.

## Installation

The package is not yet on CRAN, but can be installed from R-universe:
The stable version of **ggfixest** is available on CRAN.

``` r
install.packages("ggfixest")
```

Or, you can grab the latest development version from R-universe.

``` r
install.packages("ggfixest", repos = "https://grantmcdermott.r-universe.dev")
Expand Down Expand Up @@ -69,7 +77,7 @@ ggcoefplot(est) ## this package
The above plot call and output should look very familiar to regular
**fixest** users. Like its base equivalent, `ggcoefplot` can be heavily
customized and contains various shortcuts for common operations. For
example, we can use regex the control the coefficient grouping logic.
example, we can use regex to control the coefficient grouping logic.

``` r
ggcoefplot(est, group = list(Sepal = "^^Sepal.", Species = "^^Species"))
Expand Down
17 changes: 17 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Overview

`ggfixest` 0.1.0 is a new CRAN submission.

- I have addressed the package quoting issue.
- The CPU time vs. elapsed time issue should now be resolved in the test suite.
(Single threading is explicitly imposed for data.table, fixest, and magick.)

## Test environments

* Local: Arch Linux
* GitHub Actions (ubuntu-22.04): oldrel-1, release, devel
* Win Builder

## R CMD check results

0 errors | 0 warnings | 0 notes
24 changes: 24 additions & 0 deletions inst/tinytest/test_nthreads.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
library(tinytest)

exit_if_not(any(grepl("_R_CHECK", names(Sys.getenv()), fixed = TRUE)))

# fixest
if ( requireNamespace("fixest", quietly=TRUE) ){
library(fixest)
nfx = getFixest_nthreads()
expect_equal(nfx, 1, info = "Check fixest threads")
}

# data.table
if (requireNamespace("data.table", quietly = TRUE)) {
library(data.table)
nDT = getDTthreads()
expect_equal(nDT, 1, info = "Check data.table threads")
}

# magick
if (requireNamespace("magick", quietly = TRUE)) {
library(magick)
nmg = magick:::magick_threads(1)
expect_equal(nmg, 1, info = "Check magick threads")
}
2 changes: 1 addition & 1 deletion man/iplot_data.Rd

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

26 changes: 26 additions & 0 deletions tests/tinytest.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
## Throttle CPU threads if R CMD check (for CRAN)

if (any(grepl("_R_CHECK", names(Sys.getenv()), fixed = TRUE))) {
# fixest
if (requireNamespace("fixest", quietly = TRUE)) {
library(fixest)
setFixest_nthreads(1)
}

# data.table
if (requireNamespace("data.table", quietly = TRUE)) {
library(data.table)
setDTthreads(1)
}

# magick
if (requireNamespace("magick", quietly = TRUE)) {
library(magick)
magick:::magick_threads(1)
}
}


# Run tinytest suite

if ( requireNamespace("tinytest", quietly=TRUE) ){

tinytest::test_package("ggfixest")

}

0 comments on commit e36ab94

Please sign in to comment.