Refactor R functions, enhance README, and update documentation#47
Refactor R functions, enhance README, and update documentation#47hreinwald wants to merge 734 commits intoDoseResponse:masterfrom
Conversation
There was a problem hiding this comment.
Why removed? I'd keep it (or a qmd) to render the README.md from this
There was a problem hiding this comment.
I wanted to make the whole repo a slick a possible for a clean start. As the previous README.Rmd did not contain any crucial content I decided to simply strip that away and write a clean simple Markdown from the start. Feel free to add a .Rmd or .qmd version to the repo. 👍
| #' @keywords internal | ||
| "genRetFct" <- function(fct, parmVec, notFixed) | ||
| { | ||
| # ## Defining the model function adjusted for scaling |
There was a problem hiding this comment.
Well spotted! Absolutely! Will do :) Thx 👍
| #' @title Confidence band calculation | ||
| #' @keywords internal | ||
| "iband" <- function(object) | ||
| { |
| @@ -1,33 +0,0 @@ | |||
| "MAX" <- function( | |||
There was a problem hiding this comment.
Why removed? Not needed or unused?
There was a problem hiding this comment.
I kept this function and enhanced its documentation. See here
| @@ -19,7 +64,7 @@ function(object, fctList = NULL, nested = FALSE, sorted = c("IC", "Res var", "La | |||
|
|
|||
| retMat[1 ,1] <- logLik(object) | |||
| retMat[1, 2] <- icfct(object) # AIC(object) | |||
| if (nested) {retMat[1, 3] <- modelFit(object)[2, 5]} | |||
|
|
||
| if (identical(object$"type", "Poisson")) | ||
| { | ||
| llNull <- logLik(glm(resp ~ 1, family = poisson)) |
| if (identical(object$"type", "Poisson")) | ||
| { | ||
| llNull <- logLik(glm(resp ~ 1, family = poisson)) | ||
| respVec <- object$"dataList"$resp |
There was a problem hiding this comment.
This is triplicated and can be moved outside of the ifs()
|
I think this PR is not reviewable (too many changes) and suggest a fork? |
|
Although I do not think this is the case here: Such massive PRs are also a gateway for possible exploits. For example there are many hard-coded links to an external repo which can hide anything: Moreover there are changes to .rda files , which can hide exploits: https://github.com/hrbrmstr/rdaradar |
|
Instead of a separate fork,you could also split this up into separate, smaller & meaningful PR (by topic). |
…rage Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…overage Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…unctions-again Add test suite for getInitial achieving 100% coverage
…unctions Add test suite for backfit() achieving 100% code coverage
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Remove dead code: iband.R
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…erage Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Correct the formatting of documentation links in README.
…unctions Add test suite for noEffect function with 100% coverage
…on-necessity Add tests for searchdrc function
…p dead code, fix bugs Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/8b86502a-db64-4ab8-83e9-9ee71fc293f7 Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…rror Fix predict.drc() error with models having multiple fixed parameters
Fix bugs, enhance tests, and clean up R source files
Integrated enhancement from DoseResponse#45: - Added errbar.col parameter to plot.drc() function - Error bars now match curve colors by default (when errbar.col=NULL) - Maintains backward compatibility (errbar.col="black" for old behavior) - Updated barFct functions to accept col parameter - Updated documentation in R/plot.drc.R and man/plot.drc.Rd - Updated NEWS.md with new feature description Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/9afb7ff7-fdbc-426a-b8bd-82ef3c756602 Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
- Updated version from 3.3.0.03 to 3.3.1 in DESCRIPTION - Updated date to 2026-04-08 - Reorganized NEWS.md to list changes under version 3.3.1 - Removed outdated version reference in Changes section Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/08c4c988-b4dd-4a76-8fd8-74c231e6f539 Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Empty function without purpose and without any active code. Was removed.
Restored and enhanced documentation for the MAX function, detailing parameters, return values, and usage examples.
- Restored the complete drc 3.3.0.03 section with all features, bug fixes, and changes - Added new drc 3.3.1 section on top with only the error bar color enhancement Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/78c2efb0-45dc-4a14-abac-ae3d99a92315 Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Removed docs html for removed genRetFct. This was an empty function with no functional code in it. Clean up step.
Removed docs md for removed `genRetFct`. This was an empty function with no functional code in it. Clean up step.
Delete man/genRetFct.Rd
Delete docs/reference/genRetFct.html
…esponse Updated drc.plot function with the the feature that the error bar colors now match curve colors. This fix was suggested here: DoseResponse#45
…evel edfct functions When type='absolute', the edfct functions in model files set derivatives for c (lower limit) and d (upper limit) to 0. This is incorrect because the absolute-to-relative conversion makes p depend on c and d, requiring chain-rule corrections. Use central differences to compute correct c and d derivatives for absolute type in all affected model files. Fixes: braincousens.R, fplogistic.R, llogistic.R, llogistic2.R, lnormal.R, weibull1.R, weibull2.R, logistic.R Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/7ea3ad01-6a69-4d8a-8c99-5b419f07b01f Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…legation path Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/7ea3ad01-6a69-4d8a-8c99-5b419f07b01f Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…d incorrect p-swap The logistic model has opposite b-sign convention from log-logistic: b < 0 means increasing (not decreasing). EDhelper swaps p for b < 0, which is correct for log-logistic but wrong for logistic. Replace with inline absolute-to-relative conversion that skips the p-swap. Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/801bd853-cb45-4ae2-8e75-c28dae361ad5 Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
…solute-ed Fix model-level edfct derivatives for absolute ED type
Agent-Logs-Url: https://github.com/hreinwald/drc/sessions/c2724f6d-4710-447d-8218-01d00de1d28d Co-authored-by: hreinwald <115988583+hreinwald@users.noreply.github.com>
Update NEWS.md with recent bug fixes for ED calculations
Enhance error bar colors and update to version 3.3.1
This pull request introduces a comprehensive update to the package, including new model functions, improvements to documentation, expanded export/imports, and updates to package metadata. The main themes are: expanding dose-response modeling capabilities, improving documentation and usability, updating package infrastructure, and enhancing compatibility with modern R standards.
Dose-response modeling enhancements:
Added new model functions such as
CRS.6(generalized Cedergreen-Ritz-Streibig model for hormesis), additional variants for Cedergreen models, and new helper/model functions for effective dose calculations (ED.drc,ED.lin,EDhelper) and relative potency comparisons (EDcomp,fieller,splitInd,createsifct). All new functions are documented with roxygen comments for clarity and usability. [1] [2] [3] [4] [5] [6] [7] [8]Expanded the list of exported functions in
NAMESPACEto include new and previously unexported models and utilities, improving accessibility for users.Documentation and usability improvements:
Package infrastructure and compatibility:
Updated
DESCRIPTIONfor new version (3.3.0), new author, modern R dependency (>=4.0.0), updated URLs, encoding, roxygen version, testthat configuration, and additional suggested packages.Improved
.Rbuildignoreto exclude more files and folders, and removed.travis.ymlfor modern CI compatibility. [1] [2]Namespace and S3 methods updates:
mrdrcclass and additional confint, plot, print, ED methods, and improved imports for graphics, MASS, sandwich, lifecycle, and utils.These changes collectively modernize the package, expand its modeling capabilities, and improve its usability and maintainability for dose-response analysis in R.