Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Relevant features of new R versions #196

Open
Bisaloo opened this issue May 8, 2020 · 2 comments
Open

Relevant features of new R versions #196

Bisaloo opened this issue May 8, 2020 · 2 comments

Comments

@Bisaloo
Copy link
Collaborator

Bisaloo commented May 8, 2020

This is a bookmark issue to keep in mind the features we could leverage from the newer R versions in cases we accept to bump the minimum required R version in the future:

  • R 3.6.0

    • delayed S3 registration: opens up the possibility of a as.cimg method for rimg objects even though imager is in Suggests
    • use hcl.colors(n, palette = "cividis") instead of viridisLite::cividis(n) (removes the viridisLite dependency): see PR Use new R palette functions to get colours #184
  • R 4.0.0

    • don't import plot/plot.default (it's in base and not in graphics anymore)
    • use the palette.colors() function to specify colourblind friendly colour palettes: see PR Use new R palette functions to get colours #184
    • use list2DF() instead of do.call(cbind, ...)
  • R 4.1.0

    • Use native pipe |> in examples etc. I like pipes (TW).
    • apply(x, MARGIN, FUN, simplify = FALSE) instead of lapply(seq_len(nrow/ncol(x)), FUN)
  • R 4.4.0

    • val <- val %||% default, particularly useful to set defaults to arguments, as in

      pavo/R/segplot.R

      Lines 48 to 62 in a3e3986

      if (is.null(arg$pch)) {
      arg$pch <- 19
      }
      if (is.null(arg$xlim)) {
      arg$xlim <- c(-1.05, 1.01)
      }
      if (is.null(arg$ylim)) {
      arg$ylim <- c(-1.05, 1.05)
      }
      if (is.null(arg$xlab)) {
      arg$xlab <- " "
      }
      if (is.null(arg$ylab)) {
      arg$ylab <- " "
      }

Feel free to edit this issue to add more items

@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Nov 27, 2020

Dependency upgrades blocked by minimum R version

@Bisaloo
Copy link
Collaborator Author

Bisaloo commented Aug 27, 2024

Just a reminder that bumping the minimum R version should also be the opportunity to remove code added to ensure compatibility with older version (e.g., stringAsFactors(), getRversion() branches, etc.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant