Skip to content

Commit 8370646

Browse files
authored
Merge pull request #6 from Big-Life-Lab/cran-prep-fixes
CRAN prep: Add renv, update package metadata, and debug vignettes
2 parents db52e31 + f1bd365 commit 8370646

File tree

14 files changed

+2844
-159
lines changed

14 files changed

+2844
-159
lines changed

.Rbuildignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@
1616
^Meta$
1717
^.quarto
1818
^_freeze
19+
^\.claude$
20+
.*\.log$
21+
^renv$
22+
^renv\.lock$
23+
^test_vignettes\.R$
24+
^test_vignettes_with_timeout\.sh$
25+
^vignette_.*\.txt$
26+
^vignette_.*\.log$

.Rprofile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Activate renv for reproducible package management
2+
source("renv/activate.R")
3+
4+
# Use binary packages (no compiler needed)
5+
# Posit Package Manager provides binaries for faster installation
6+
options(
7+
pkgType = "binary",
8+
repos = c(CRAN = "https://packagemanager.posit.co/cran/latest")
9+
)
10+
11+
# Warn if R version is below the package floor
12+
if (getRversion() < "4.0") {
13+
warning(
14+
"chmsflow requires R >= 4.0.0. ",
15+
"You are using R ", getRversion(), ". ",
16+
"Some features may not work correctly."
17+
)
18+
}

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ src/*.o
6464
src/*.so
6565
src/*.dll
6666

67-
# If you use renv for package dependency management, ignore these files
68-
renv.lock
69-
renv/
67+
# renv for package dependency management
68+
# Keep renv.lock and renv/activate.R in git for reproducibility
69+
# Ignore the local library and cache
70+
renv/library/
71+
renv/local/
72+
renv/staging/
7073

7174
# If you use packrat for package dependency management, ignore these files
7275
packrat/

DESCRIPTION

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@ Package: chmsflow
22
Type: Package
33
Title: Transforming and Harmonizing CHMS Variables
44
Version: 0.1.0
5-
Author: Rafidul Islam [aut, cre], Douglas Manuel [aut], Therese Chan [aut]
6-
Maintainer: Rafidul Islam <raislam@ohri.ca>
75
Authors@R: c(
86
person("Rafidul", "Islam", email = "raislam@ohri.ca", role = c("aut", "cre")),
9-
person("Douglas", "Manuel", email = "dmanuel@ohri.ca", role = c("aut"), comment = c(ORCID = "0000-0003-0912-0845")),
7+
person("Douglas", "Manuel", email = "dmanuel@ohri.ca", role = c("aut"), comment = c(ORCID = "0000-0003-0912-0845")),
108
person("Therese", "Chan", email = "TChan@bruyere.org", role = c("aut")))
119
Description: Supporting the use of the Canadian Health Measures Survey (CHMS)
1210
by transforming variables from each cycle into harmonized, consistent
1311
versions that span survey cycles 1-6. This package uses rec_with_table(),
1412
which was developed from 'sjmisc' rec(). Ludecke D (2018). "sjmisc: Data
1513
and Variable Transformation Functions". Journal of Open Source Software,
1614
3(26), 754. <doi:10.21105/joss.00754>.
17-
Depends:
18-
R (>= 3.5)
15+
Depends:
16+
R (>= 4.0)
1917
Imports: dplyr, haven, logger
2018
License: MIT + file LICENSE
2119
URL: https://github.com/Big-Life-Lab/chmsflow, https://big-life-lab.github.io/chmsflow/
@@ -25,4 +23,5 @@ Roxygen: list(markdown = TRUE)
2523
RoxygenNote: 7.3.2
2624
Suggests: DT, kableExtra, knitr, quarto, readr, recodeflow, testthat (>= 3.0.0)
2725
VignetteBuilder: quarto
26+
Config/build/clean-inst-doc: FALSE
2827
LazyData: true

R/medications.R

Lines changed: 136 additions & 128 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ To use `chmsflow` at a Research Data Centre (RDC), you'll need to load the packa
6464
library(chmsflow)
6565
```
6666

67+
## Development setup
68+
69+
This package uses renv for dependency management. After cloning the repository:
70+
71+
```r
72+
# Restore package dependencies
73+
renv::restore()
74+
75+
# Install the package locally
76+
devtools::install()
77+
```
78+
79+
The project requires R >= 4.0.0. When you load the project, `.Rprofile` will warn if your R version is below this floor.
80+
6781
## What's Included?
6882

6983
The `chmsflow` package comes with several useful resources:

0 commit comments

Comments
 (0)