From 00c197dec9610d13eeef9413530ec77ee6700747 Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:17:24 +0100 Subject: [PATCH 1/8] cran feedback implemented --- .Rbuildignore | 1 + DESCRIPTION | 2 +- R/cascadePlot.R | 1 + R/colors.R | 7 ++++--- R/pcaPlots.R | 3 ++- R/utils.R | 7 ++++--- cran-feedback.md | 38 ++++++++++++++++++++++++++++++++++++++ man/colorpanel.Rd | 5 +++-- man/getLims.Rd | 3 +++ man/plotPCA.prcomp.Rd | 1 + man/ribiosPlot-package.Rd | 2 +- man/rowVars.Rd | 3 +++ 12 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 cran-feedback.md diff --git a/.Rbuildignore b/.Rbuildignore index 72430bf..5a2f23d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -17,3 +17,4 @@ ^cran-comments\.md$ ^bin$ ^CRAN-SUBMISSION$ +cran-feedback.md diff --git a/DESCRIPTION b/DESCRIPTION index 47aab2f..587ac23 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,7 +9,7 @@ Authors@R: role = c("aut", "cre", "ctb"), email = "jitao_david.zhang@roche.com", comment = c(ORCID="0000-0002-3085-0909"))) -Description: Provides data structures and functions for data transformation and visualization in computational biology in drug discovery. Includes heatmaps, color schemes, PCA plots, and various plotting utilities. +Description: Provides data structures and functions for data transformation and visualization in computational biology in drug discovery as part of the 'ribios' software suite. Zhang (2025) . Depends: R (>= 3.4.0) Imports: diff --git a/R/cascadePlot.R b/R/cascadePlot.R index f679c75..8dc4d35 100644 --- a/R/cascadePlot.R +++ b/R/cascadePlot.R @@ -4,6 +4,7 @@ #' @param x Numeric matrix #' @param na.rm Logical. Should missing values (including NaN) be omitted from #' the calculations? +#' @return A numeric vector of length \code{nrow(x)} with the row-wise variances. #' @keywords internal #' @examples #' diff --git a/R/colors.R b/R/colors.R index 0c6f68b..1dbdfaf 100644 --- a/R/colors.R +++ b/R/colors.R @@ -39,8 +39,8 @@ #' image(z=matrix(1:100, ncol=1), col=col, xaxt="n", yaxt="n") #' } #' -#' par(mfrow=c(3,3)) -#' +#' oldpar <- par(mfrow=c(3,3)) +#' #' # two colors only: #' showpanel(colorpanel(8,low="red",high="green")) #' @@ -57,7 +57,8 @@ #' #' showpanel(royalbluered(64)) #' showpanel(royalredblue(64)) -#' +#' par(oldpar) +#' #' @importFrom ribiosUtils isOdd #' @export colorpanel colorpanel <- function (n, low, mid, high) { diff --git a/R/pcaPlots.R b/R/pcaPlots.R index 3e06e56..e46b744 100644 --- a/R/pcaPlots.R +++ b/R/pcaPlots.R @@ -217,7 +217,8 @@ plotPCA <- function(x, choices, ...) UseMethod("plotPCA") #' rop <- par(mfrow=c(1,2), pty="s") #' plotPCA(testPCA, choices=c(1,2), grid=TRUE, points=pointsList, text=textList) #' plotPCA(testPCA, choices=c(2,3), grid=TRUE, points=pointsList, text=textList) -#' +#' par(rop) +#' #' @export plotPCA.prcomp <- function(x, choices=c(1,2), diff --git a/R/utils.R b/R/utils.R index 2d4b6db..15c1cb7 100644 --- a/R/utils.R +++ b/R/utils.R @@ -244,16 +244,17 @@ intRange <- function(x, na.rm=TRUE) { #' limits; if set to 1 the whole range is used. #' @param symm logical value; if set to \code{TRUE}, the range will be #' symmetric around zero +#' @return A numeric vector of length 2 giving the lower and upper axis limits. #' @examples -#' +#' #' myX <- rnorm(100, mean=1) #' myY <- rnorm(100) #' myLim <- getLims(myX, myY, perc=0.99) #' plot(myX, myY, xlim=myLim, ylim=myLim) #' mySymmLim <- getLims(myX, myY, perc=0.99, symm=TRUE) #' plot(myX, myY, xlim=myLim, ylim=mySymmLim) -#' -#' +#' +#' #' @export getLims getLims <- function(..., perc=0.99, symm=TRUE) { lower <- (1-perc)/2 diff --git a/cran-feedback.md b/cran-feedback.md new file mode 100644 index 0000000..cb52324 --- /dev/null +++ b/cran-feedback.md @@ -0,0 +1,38 @@ +Please always explain all acronyms in the description text. -> PCA +For more details: + + +If there are references describing the methods in your package, please +add these in the description field of your DESCRIPTION file in the form +authors (year) +authors (year, ISBN:...) +or if those are not available: +with no space after 'doi:', 'https:' and angle brackets for +auto-linking. (If you want to add a title as well please put it in +quotes: "Title") +For more details: + + +Please add \value to .Rd files regarding exported methods and explain +the functions results in the documentation. Please write about the +structure of the output (class) and also what the output means. (If a +function does not return a value, please document that too, e.g. +\value{No return value, called for side effects} or similar) +For more details: + + +-> Missing Rd-tags: + getLims.Rd: \value + rowVars.Rd: \value + +Please always make sure to reset to user's options(), working directory +or par() after you changed it in examples and vignettes and demos. +e.g.: +oldpar <- par(mfrow = c(1,2)) +... +par(oldpar) + +-> man/colorpanel.Rd, man/plotPCA.prcomp.Rd + +For more details: + diff --git a/man/colorpanel.Rd b/man/colorpanel.Rd index ac8573f..789e9c1 100644 --- a/man/colorpanel.Rd +++ b/man/colorpanel.Rd @@ -48,8 +48,8 @@ showpanel <- function(col) { image(z=matrix(1:100, ncol=1), col=col, xaxt="n", yaxt="n") } -par(mfrow=c(3,3)) - +oldpar <- par(mfrow=c(3,3)) + # two colors only: showpanel(colorpanel(8,low="red",high="green")) @@ -66,6 +66,7 @@ showpanel(redblue(64)) showpanel(royalbluered(64)) showpanel(royalredblue(64)) +par(oldpar) } \references{ diff --git a/man/getLims.Rd b/man/getLims.Rd index d21ec3e..69d6958 100644 --- a/man/getLims.Rd +++ b/man/getLims.Rd @@ -15,6 +15,9 @@ limits; if set to 1 the whole range is used.} \item{symm}{logical value; if set to \code{TRUE}, the range will be symmetric around zero} } +\value{ +A numeric vector of length 2 giving the lower and upper axis limits. +} \description{ Get xlim/ylim ranges for plots from real values } diff --git a/man/plotPCA.prcomp.Rd b/man/plotPCA.prcomp.Rd index d08e173..9e27128 100644 --- a/man/plotPCA.prcomp.Rd +++ b/man/plotPCA.prcomp.Rd @@ -115,6 +115,7 @@ plotPCA(testPCA, choices=c(1,2), grid=TRUE, points=pointsList, rop <- par(mfrow=c(1,2), pty="s") plotPCA(testPCA, choices=c(1,2), grid=TRUE, points=pointsList, text=textList) plotPCA(testPCA, choices=c(2,3), grid=TRUE, points=pointsList, text=textList) +par(rop) } \seealso{ diff --git a/man/ribiosPlot-package.Rd b/man/ribiosPlot-package.Rd index e4c01a2..8e53eaa 100644 --- a/man/ribiosPlot-package.Rd +++ b/man/ribiosPlot-package.Rd @@ -6,7 +6,7 @@ \alias{ribiosPlot-package} \title{ribiosPlot: Plotting Module of the 'ribios' Software Suite} \description{ -Provides data structures and functions for data transformation and visualization in computational biology in drug discovery. Includes heatmaps, color schemes, PCA plots, and various plotting utilities. +Provides data structures and functions for data transformation and visualization in computational biology in drug discovery. Includes heatmaps, color schemes, Principal Component Analysis (PCA) plots, and various plotting utilities. } \seealso{ Useful links: diff --git a/man/rowVars.Rd b/man/rowVars.Rd index 949ec5e..80bc598 100644 --- a/man/rowVars.Rd +++ b/man/rowVars.Rd @@ -12,6 +12,9 @@ rowVars(x, na.rm = TRUE) \item{na.rm}{Logical. Should missing values (including NaN) be omitted from the calculations?} } +\value{ +A numeric vector of length \code{nrow(x)} with the row-wise variances. +} \description{ Variance of features in rows } From e007918cd04572620ebc2e766d9b05d9050ae79f Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:20:35 +0100 Subject: [PATCH 2/8] check passed --- man/ribiosPlot-package.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ribiosPlot-package.Rd b/man/ribiosPlot-package.Rd index 8e53eaa..7ec6fdb 100644 --- a/man/ribiosPlot-package.Rd +++ b/man/ribiosPlot-package.Rd @@ -6,7 +6,7 @@ \alias{ribiosPlot-package} \title{ribiosPlot: Plotting Module of the 'ribios' Software Suite} \description{ -Provides data structures and functions for data transformation and visualization in computational biology in drug discovery. Includes heatmaps, color schemes, Principal Component Analysis (PCA) plots, and various plotting utilities. +Provides data structures and functions for data transformation and visualization in computational biology in drug discovery as part of the 'ribios' software suite. Zhang (2025) \url{https://github.com/bedapub/ribiosPlot}. } \seealso{ Useful links: From 79c9395d76734cb6c31364102ad0306ee5f6feb7 Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:26:45 +0100 Subject: [PATCH 3/8] fixing testthat issue --- .github/workflows/standard-ci-workflow.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/standard-ci-workflow.yml b/.github/workflows/standard-ci-workflow.yml index 133d9cb..b58897d 100644 --- a/.github/workflows/standard-ci-workflow.yml +++ b/.github/workflows/standard-ci-workflow.yml @@ -44,8 +44,6 @@ jobs: with: extra-packages: any::rcmdcheck needs: check - # Skip ribiosArg (not yet on CRAN) and Vennerable (GitHub only) - dependencies: '"hard"' - uses: r-lib/actions/check-r-package@v2 with: From 16a310ad4e4a38dae368144c71b94312d7456420 Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:32:49 +0100 Subject: [PATCH 4/8] add explicit installation of testthat, rcmdcheck, ribiosArg, and Vennerable --- .github/workflows/standard-ci-workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/standard-ci-workflow.yml b/.github/workflows/standard-ci-workflow.yml index b58897d..fbdeb77 100644 --- a/.github/workflows/standard-ci-workflow.yml +++ b/.github/workflows/standard-ci-workflow.yml @@ -42,8 +42,9 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck + extra-packages: any::rcmdcheck, any::testthat, any::Vennerable, any::ribiosArg needs: check + dependencies: '"soft"' - uses: r-lib/actions/check-r-package@v2 with: From 5dc6415111f5873d42dd5b47d7e85af0f1a2a4ac Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:37:57 +0100 Subject: [PATCH 5/8] fixing setup-r action by adding extra-repositories: https://bedapub.r-universe.dev --- .github/workflows/standard-ci-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/standard-ci-workflow.yml b/.github/workflows/standard-ci-workflow.yml index fbdeb77..28ff1c7 100644 --- a/.github/workflows/standard-ci-workflow.yml +++ b/.github/workflows/standard-ci-workflow.yml @@ -39,6 +39,7 @@ jobs: with: r-version: ${{ matrix.config.r }} use-public-rspm: true + extra-repositories: https://bedapub.r-universe.dev - uses: r-lib/actions/setup-r-dependencies@v2 with: From 393223da903b289e59e018bfa73dd93055572629 Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:43:30 +0100 Subject: [PATCH 6/8] amending the date --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 587ac23..dbeb880 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: ribiosPlot Type: Package Title: Plotting Module of the 'ribios' Software Suite Version: 1.3.0 -Date: 2026-01-24 +Date: 2026-02-20 Authors@R: c(person(given = "Jitao David", family = "Zhang", From 3eb84b302e75d8325df3a645a4b7c48c2c9feb78 Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:50:47 +0100 Subject: [PATCH 7/8] in macOS, install JPEG --- .github/workflows/standard-ci-workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/standard-ci-workflow.yml b/.github/workflows/standard-ci-workflow.yml index 28ff1c7..4235f22 100644 --- a/.github/workflows/standard-ci-workflow.yml +++ b/.github/workflows/standard-ci-workflow.yml @@ -41,6 +41,10 @@ jobs: use-public-rspm: true extra-repositories: https://bedapub.r-universe.dev + - name: Install system dependencies (macOS) + if: runner.os == 'macOS' + run: brew install jpeg + - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck, any::testthat, any::Vennerable, any::ribiosArg From 4595f2e9e203aded2bd14469abba62e80160fe78 Mon Sep 17 00:00:00 2001 From: Jitao David Zhang Date: Fri, 20 Feb 2026 21:54:56 +0100 Subject: [PATCH 8/8] use the ~/.R/Makevars trick to let R find libjpeg.h --- .github/workflows/standard-ci-workflow.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/standard-ci-workflow.yml b/.github/workflows/standard-ci-workflow.yml index 4235f22..ccc0320 100644 --- a/.github/workflows/standard-ci-workflow.yml +++ b/.github/workflows/standard-ci-workflow.yml @@ -43,7 +43,11 @@ jobs: - name: Install system dependencies (macOS) if: runner.os == 'macOS' - run: brew install jpeg + run: | + brew install jpeg + mkdir -p ~/.R + echo "CPPFLAGS += -I$(brew --prefix jpeg)/include" >> ~/.R/Makevars + echo "LDFLAGS += -L$(brew --prefix jpeg)/lib" >> ~/.R/Makevars - uses: r-lib/actions/setup-r-dependencies@v2 with: