Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E esviz
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • esviz
  • Issues
  • #5
Closed
Open
Issue created Oct 25, 2023 by aho@ahoMaintainer

Import package in PlotWeeklyClim and PlotForecastPDF

Hi @erifarov

I found some small things to be improved in PlotWeeklyClim() and PlotForecastPDF().

PlotWeeklyClim

  • lubricate::year is used too but only ymd() is imported (https://earth.bsc.es/gitlab/es/esviz/-/blob/main/R/PlotWeeklyClim.R#L79) Actually, I don't know if it's worth getting rid of the dependency on lubridate, which is only used in PlotWeeklyClim(). If the function can be easily replaced, we can do that. Can you take a look? Thanks.
  • It uses Apply(). Is it worth using Apply() or apply() can easily do the same thing? And how about the speed? If apply() is not suitable here and Apply() is slow, we can add ncores option in the function.
  • Minor suggestion: import only scale::date_format instead of the whole package (https://earth.bsc.es/gitlab/es/esviz/-/blob/main/R/PlotWeeklyClim.R#L75)

PlotForecastPDF

  • no need to import plyr twice (https://earth.bsc.es/gitlab/es/esviz/-/blob/main/R/PlotForecastPDF.R#L55)
  • Combine data.table import into one line

Cheers,
An-Chi

Assignee
Assign to
Time tracking