- Before: Used
\dontrun{}in Shiny function examples - After: Replaced with
if(interactive()){}in:quartify_app.Rdquartify_app_web.Rd
- Impact: Examples clearly show these are interactive-only functions
- Before: Used
cat()to write to console inrtoqmd_dir.R - After: Replaced with
message() - Impact: Output can now be suppressed with
suppressMessages()
- Before:
setwd()called without immediateon.exit() - After: Added
on.exit(setwd(old_wd), add = TRUE)immediately after everysetwd() - Files fixed:
R/rtoqmd.R(line 969-974)R/rtoqmd_dir.R(line 458-459)R/quartify_app_web.R(lines 659-660, 813-814)
- Impact: Working directory always restored, even on error
- Before:
install_quartify_snippets()wrote to~/.R/snippets/by default - After:
- Added
pathparameter for custom location - Examples use
tempdir()for testing - Interactive examples wrapped in
if(interactive())
- Added
- Impact: No default writes to user's home directory in non-interactive context
- Issue: Tilde (~) paths not expanded, causing Quarto errors
- Fix: Added
path.expand()for all file paths inrtoqmd() - Impact: Paths like
~/file.qmdnow work correctly
Version: 1.0.0 (updated from 0.0.9) R CMD check: 0 errors ✔ | 0 warnings ✔ | 1 note ✖ (time verification only)
- NEWS.md: Complete changelog for version 1.0.0
- cran-comments.md: Updated with all fixes and compliance notes
- Vignettes: Added comprehensive
apply_stylerdocumentation (EN/FR)
The package is now fully compliant with CRAN policies and ready for submission!
-
Build the package:
devtools::build()
-
Final check:
devtools::check(remote = TRUE, manual = TRUE)
-
Submit to CRAN:
devtools::submit_cran()
Or manually via https://cran.r-project.org/submit.html
R/quartify_app.R- Interactive examplesR/quartify_app_web.R- on.exit() fixes, interactive examplesR/rtoqmd.R- Path expansion, on.exit() fixesR/rtoqmd_dir.R- message() instead of cat(), on.exit() fixesR/snippets.R- Path parameter, interactive examplesDESCRIPTION- Version bump to 1.0.0NEWS.md- Version 1.0.0 changelogcran-comments.md- Updated submission notesman/*.Rd- Regenerated documentation
All 4 major CRAN policy violations have been fixed:
- ✅ Interactive functions properly documented
- ✅ Console output uses message() not cat()
- ✅ Working directory always restored with on.exit()
- ✅ No default writes to user home directory
Plus bonus fix: 5. ✅ Tilde path expansion for better UX
The package is production-ready for CRAN! 🚀