From face66ab257f3f1040b357078eeed1114d3654ed Mon Sep 17 00:00:00 2001 From: Malcolm Barrett Date: Sat, 21 Mar 2026 17:26:56 -0400 Subject: [PATCH] run extra checks for cran prep --- .Rbuildignore | 1 + .gitignore | 1 + DESCRIPTION | 3 +-- LICENSE | 2 +- LICENSE.md | 2 +- NEWS.md | 9 +++++++++ R/causalpie.R | 1 + README.Rmd | 10 ++++++++-- README.md | 10 ++++++++-- man/themes.Rd | 3 +++ 10 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 NEWS.md diff --git a/.Rbuildignore b/.Rbuildignore index 37cb0b7..90c4e29 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -11,3 +11,4 @@ ^_pkgdown\.yml$ ^docs$ ^pkgdown$ +^cran-comments\.md$ diff --git a/.gitignore b/.gitignore index 234f028..e0ab1a7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .RData .Ruserdata docs +cran-comments.md diff --git a/DESCRIPTION b/DESCRIPTION index b6aca7b..b84dcdf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,9 +3,8 @@ Package: causalpie Title: Causal Pies for Sufficient Causes Version: 0.1.0 Authors@R: - person("Malcolm", "Barrett", , "malcolmbarrett@gmail.com", role = c("aut", "cre"), + person("Malcolm", "Barrett", , "malcolmbarrett@gmail.com", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-0299-5825")) -Maintainer: Malcolm Barrett Description: Causal pies are a way of visualizing the sufficient causes framework. Sufficient causes are what must occur before some event happens. The components of what causes the event may be in any or all diff --git a/LICENSE b/LICENSE index c94043d..965889c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ -YEAR: 2018 +YEAR: 2026 COPYRIGHT HOLDER: Malcolm Barrett diff --git a/LICENSE.md b/LICENSE.md index 3bc83a8..3bbed18 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2018 Malcolm Barrett +Copyright (c) 2026 Malcolm Barrett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..f27e858 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,9 @@ +# causalpie 0.1.0 + +* Initial CRAN release. +* Added `causify()` and `sc()` for creating sufficient-component cause models. +* Added `causal_pie()` and `causal_pie_necessary()` for visualizing causal pies. +* Added `components()`, `necessary_causes()`, and `sufficient_causes()` for + querying cause data. +* Added `theme_causal_pie()` and `theme_causal_pie_grid()` for minimalist + plot themes. diff --git a/R/causalpie.R b/R/causalpie.R index e739bde..f74a59a 100644 --- a/R/causalpie.R +++ b/R/causalpie.R @@ -65,6 +65,7 @@ causal_pie_necessary <- function(causes, text_col = "black") { #' @inheritParams ggplot2::theme_minimal #' @param ... additional arguments passed to `theme()` #' +#' @return A [ggplot2::theme] object #' @export #' #' @examples diff --git a/README.Rmd b/README.Rmd index 0ca0837..28737b9 100644 --- a/README.Rmd +++ b/README.Rmd @@ -20,11 +20,17 @@ knitr::opts_chunk$set( ## Installation +You can install causalpie from CRAN with: + +``` r +install.packages("causalpie") +``` + You can install the development version of `causalpie` from GitHub with: ``` r -# install.packages("devtools") -devtools::install_github("malcolmbarrett/causalpie") +# install.packages("pak") +pak::pak("r-causal/causalpie") ``` ## Sufficient causes and causal pies diff --git a/README.md b/README.md index 2a562c1..3efbd18 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,17 @@ in `ggplot2`. ## Installation +You can install causalpie from CRAN with: + +``` r +install.packages("causalpie") +``` + You can install the development version of `causalpie` from GitHub with: ``` r -# install.packages("devtools") -devtools::install_github("malcolmbarrett/causalpie") +# install.packages("pak") +pak::pak("r-causal/causalpie") ``` ## Sufficient causes and causal pies diff --git a/man/themes.Rd b/man/themes.Rd index 207ac3c..77a947d 100644 --- a/man/themes.Rd +++ b/man/themes.Rd @@ -17,6 +17,9 @@ theme_causal_pie_grid(base_size = 12, base_family = "", ...) \item{...}{additional arguments passed to \code{theme()}} } +\value{ +A \link[ggplot2:theme]{ggplot2::theme} object +} \description{ Minimalist themes for causal pies }