Skip to content

Initial launch of refactoring R functions, update README, and remove obsolete files#46

Closed
hreinwald wants to merge 88 commits intoDoseResponse:masterfrom
hreinwald:main
Closed

Initial launch of refactoring R functions, update README, and remove obsolete files#46
hreinwald wants to merge 88 commits intoDoseResponse:masterfrom
hreinwald:main

Conversation

@hreinwald
Copy link
Copy Markdown

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:

  • Removed the .travis.yml file and added it, along with several other project and documentation files, to .Rbuildignore to prevent them from being included in package builds. [1] [2]
  • Deleted the README.Rmd file, which contained installation and overview instructions, likely in favor of other documentation practices.

Code cleanup and removal of unused code:

  • Removed large blocks of commented-out and legacy code from R/drmEMstandard.R and R/llogistic.ssf.R, significantly reducing clutter and improving maintainability. [1] [2]

Refactoring and minor bug fixes:

  • Replaced the use of eval(parse(...)) with safer and more idiomatic R constructs like do.call() and match.fun() in R/rdrm.r, improving code safety and readability. [1] [2] [3] [4]
  • Fixed a bug in R/noEffect.R where the Poisson null model was incorrectly specified, now explicitly extracting the response vector before fitting the model.
  • Improved warning handling in R/searchdrc.R by saving and restoring the original warning option, ensuring that global warning settings are not inadvertently changed.
  • Removed debugging print() statements from several functions for cleaner output. [1] [2]

Copilot AI and others added 30 commits March 6, 2026 14:12
- 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>
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>
Copilot AI and others added 28 commits March 10, 2026 10:07
…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
@hreinwald hreinwald closed this Mar 10, 2026
@hreinwald hreinwald deleted the main branch March 10, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants