Initial launch of refactoring R functions, update README, and remove obsolete files#46
Closed
hreinwald wants to merge 88 commits intoDoseResponse:masterfrom
Closed
Initial launch of refactoring R functions, update README, and remove obsolete files#46hreinwald wants to merge 88 commits intoDoseResponse:masterfrom
hreinwald wants to merge 88 commits intoDoseResponse:masterfrom
Conversation
- README.md: Complete rewrite with package overview, installation, quick start examples, available models, key functions, and supported data types - drmEMstandard.R: Remove active print() debug statements in opfct() and remove dead if(FALSE) code block (~170 lines of experimental scratch code) - findbe.r: Remove active print(c(bVal, eVal)) debug statement in findbe2() - llogistic.ssf.R: Remove dead if(FALSE) code block (~200 lines of stale logic) - searchdrc.R: Fix unsafe options(warn=-1) usage with on.exit() for guaranteed warning state restoration - noEffect.R: Fix unscoped variable reference 'resp' in Poisson branch - rdrm.r: Replace eval(parse(text=...)) code injection with match.fun/do.call Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…or-functions Add comprehensive README and refactor poorly coded R functions
The /tests folder contained ad-hoc scripts from 2007-2009 that were development artifacts, not proper package tests: - No testing framework (no testthat, no RUnit) - No assertions or expected output comparisons - seedGerminationMods.R was 100% commented out - test2.r was mostly commented out since May 2009 - Old commented-out Windows absolute paths - No other package files reference the tests/ folder Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…lder Remove /tests folder (development artifacts)
Can be safely removed. Not needed for the package dev
… remove redundant reference files Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Update .gitignore and .Rbuildignore with standard R package settings
…md, _pkgdown.yml Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Remove obsolete base-level files
First dev merge to main
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…ws-file Add news file entry summarizing all fork changes from upstream
Summarize all fork changes in news file
…s, add missing Imports Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…pace-files Fix DESCRIPTION format: add Encoding, fix Authors@R, remove deprecated fields
…>'e2' in ursa, 'contain'->'contents' in EDcomp, 'mising'->'missing' and 'reponses'->'responses' in drm.Rd, 'reponse'->'response' in CRS.5a.Rd Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Add roxygen2 comment blocks before the function definitions in drm() and drmc(), based on the existing hand-written .Rd man pages. Only comments are added; no function code is modified. No @export tags are included since the package uses a hand-written NAMESPACE file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add roxygen2 headers (#' comments) before function definitions in four R source files based on their corresponding .Rd man pages: - R/ED.drc.R: ED generic and ED.drc method with full param/details docs - R/EDcomp.R: EDcomp with full docs; fieller, splitInd, createsifct marked as @Keywords internal - R/compParm.R: compParm with full param/return/examples docs - R/comped.r: comped with full param/return/examples docs No @export tags added. No function code modified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add roxygen2 headers (#' comments) before function definitions in: - plot.drc.R: main plot.drc function with full param/details/examples - predict.drc.R: predict.drc function - summary.drc.R: summary.drc function - anova.drc.R: main anova.drc function - coef.drc.R: coef.drc function - confint.drc.R: confint.drc function - fitted.drc.R: fitted.drc function - residuals.drc.R: residuals.drc function - logLik.drc.R: logLik.drc function - vcov.drc.R: main vcov.drc function Documentation derived from corresponding .Rd man pages. No @export tags added. Function code unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add roxygen2 headers (#' comments) before function definitions in: - update.drc.R: update.drc function - print.drc.R: print.drc function - print.summary.drc.R: print.summary.drc function - hatvalues.drc.R: hatvalues.drc function - cooks.distance.drc.R: cooks.distance.drc function (undocumented) - boxcox.drc.R: boxcox.drc main function only - sandwich.r: estfun.drc and bread.drc functions - modelFit.R: modelFit function only - mselect.r: mselect function - noEffect.R: noEffect function Documentation derived from corresponding .Rd man pages. No @export tags added. No function code modified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…operly delegate to helper functions The helper functions cedergreen_edfct and cedergreen_maxfct were being assigned directly to the return list, but they have different signatures than what the framework expects. Created proper wrapper closures inside cedergreen2() that bind parmVec, notFixed, and alpha from the enclosing scope and delegate to the helpers with the correct parameters. Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…ction Fix cedergreen2() edfct/maxfct parameter binding to helper functions
Add #' @exportS3Method roxygen2 tags to: - predict.mrdrc (R/mrdrm.r) - ED.mrdrc (R/mrdrm.r) - plot.mrdrc (R/mrdrm.r) - print.mrdrc (R/mrdrm.r) - confint.basic (R/confint.drc.R) Fixes devtools::document() errors about missing export tags. Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Add @exportS3Method tags to S3 methods missing export annotations
In roxygen comments, \% gets double-escaped to \\% in generated .Rd files. In Rd syntax, \\ is a literal backslash and % starts a comment, which eats the rest of the line including closing braces. This caused the \arguments section in ED.drc.Rd to remain unclosed, triggering "unexpected section header" warnings for all subsequent sections. Fixed by removing the unnecessary backslash escape before % in roxygen comments (roxygen2 auto-escapes % to \% in .Rd output), and correcting the generated .Rd files to use proper \% escaping. Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Fix double-escaped percent signs in roxygen docs causing Rd parse warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on code cleanup and modernization, with the removal of legacy or unused code, refactoring for better readability and maintainability, and minor bug fixes. It also updates project configuration files to better align with current practices.
Project configuration and cleanup:
.travis.ymlfile and added it, along with several other project and documentation files, to.Rbuildignoreto prevent them from being included in package builds. [1] [2]README.Rmdfile, which contained installation and overview instructions, likely in favor of other documentation practices.Code cleanup and removal of unused code:
R/drmEMstandard.RandR/llogistic.ssf.R, significantly reducing clutter and improving maintainability. [1] [2]Refactoring and minor bug fixes:
eval(parse(...))with safer and more idiomatic R constructs likedo.call()andmatch.fun()inR/rdrm.r, improving code safety and readability. [1] [2] [3] [4]R/noEffect.Rwhere the Poisson null model was incorrectly specified, now explicitly extracting the response vector before fitting the model.R/searchdrc.Rby saving and restoring the original warning option, ensuring that global warning settings are not inadvertently changed.print()statements from several functions for cleaner output. [1] [2]