Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • startR startR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • 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
  • startRstartR
  • Issues
  • #176
Closed
Open
Issue created Apr 13, 2023 by aho@ahoMaintainer

Step() parameter "use_libraries" is not functional in ByChunks()

The definition of the parameter use_libraries:

#'@param use_libraries A vector of character string indicating the R library 
#'  names to be used in 'fun'. The default value is NULL.

The libraries are saved in attributes, and eventually in the attributes of operation in Compute(). However, in ByChunks(), the libraries are not loaded. So the computation at Apply() in ByChunks() fails because functions not found.

# find a data to load by Start()
repos <- '/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc'
data <- Start(dat = repos,
              var = 'tas',
              sdate = c('20170101', '20180101'),
              ensemble = indices(1:20),
              time = 'all',
              latitude = indices(1:4),
              longitude = indices(1:4),
              return_vars = list(latitude = 'dat', longitude = 'dat', time = 'sdate'),
              retrieve = FALSE)


func1 <- function(x) {
  object_size(x)  # pryr function
}
step1 <- Step(func1, target_dims = c('sdate'),
             output_dims = NULL,
             use_libraries = 'pryr')
wf1 <- AddStep(data, step1)
res <- Compute(wf1, chunk = list(time = 2))
Edited Apr 14, 2023 by aho
Assignee
Assign to
Time tracking