glotaran / TIMP

TIMP is an R package for fitting superposition models that implements the partitioned variable projection algorithm. The package has been extensively applied to modeling spectroscopy and Fluorescence Lifetime Imaging Microscopy (FLIM) datasets. This is the git managed codebase of the r-forge TIMP project.
https://glotaran.github.io/TIMP/
GNU General Public License v2.0
2 stars 1 forks source link

♻️ More CRAN issues to fix in TIMP 1.13.5 #11

Closed jsnel closed 1 year ago

jsnel commented 1 year ago

Proposed refactoring

The last submission of the TIMP 1.13.5 package resulted in a list of issues to fix.

Additional context

-> Have these issues been solved?

  1. Use Authors@R

Please rather use the Authors@R field and declare Maintainer, Authors and Contributors with their appropriate roles with person() calls. e.g. something like: Authors@R: c(person("Alice", "Developer", role = c("aut", "cre","cph"), email = "alice.developer@some.domain.net"), person("Bob", "Dev", role = "aut") )

  1. References

    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) authors (year, ISBN:...) or if those are not available: <[https:...]https:...> with no space after 'doi:', 'arXiv:', 'https:' and angle brackets for auto-linking. (If you want to add a title as well please put it in quotes: "Title")

  2. Acronyms

    Please always explain all acronyms in the description text. -> 'FLIM-FRET'

  3. Documentation

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) Missing Rd-tags: divergeZimage.Rd: \value efit2file.Rd: \value examineFit.Rd: \value FLIMplots.Rd: \value internals.Rd: \arguments, \value sumKinSpecEst.Rd: \value writeAverage.Rd: \value

  1. Examples \dontrun -> \donttest

\dontrun{} should only be used if the example really cannot be executed (e.g. because of missing additional software, missing API keys, ...) by the user. That's why wrapping examples in \dontrun{} adds the comment ("# Not run:") as a warning for the user. Does not seem necessary. Please replace \dontrun with \donttest.

Please unwrap the examples if they are executable in < 5 sec, or replace dontrun{} with \donttest{}.

  1. No side-effects

    Please make sure that you do not change the user's options, par or working directory. If you really have to do so within functions, please ensure with an immediate call of on.exit() that the settings are reset when the function is exited. e.g.:

oldpar <- par(no.readonly = TRUE) # code line i
on.exit(par(oldpar)) # code line i + 1
par(mfrow=c(2,2)) # somewhere after

If you're not familiar with the function, please check ?on.exit. This function makes it possible to restore options before exiting a function even if the function breaks. Therefore it needs to be called immediately after the option change within a function.

Please always make sure to reset to user's options(), working directory or par() after you changed it in examples and vignettes and demos. ->

man/FLIMplots.Rd e.g.:

oldpar <- par(mfrow = c(1,2))
par(oldpar)

Please fix and resubmit.

jsnel commented 1 year ago

Found some resources to help with some of the issues related to the (formatting of) the DESCRIPTION file:

Example packages to emulate:

Observations:

For reference, the old package description:

Description: A problem-solving environment (PSE) for fitting
         separable nonlinear models to measurements arising in physics
         and chemistry experiments; has been extensively applied to
         time-resolved spectroscopy and FLIM-FRET data.