Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S s2dverification
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • s2dverification
  • Merge requests
  • !195

Composite of 1 element return the same element.

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Nuria Pérez-Zanón requested to merge develop-composite into master Apr 18, 2019
  • Overview 2
  • Commits 5
  • Pipelines 0
  • Changes 5

The following correction has been added:

    if (length(indices) == 1) {
        composite[,, k] <- var[,, indices]
        warning(paste("Composite", k, "has length 1 and pvalue is NA."))
    }  else {
        composite[,,k] <- Mean1Dim(var[,, indices], posdim = 3, narm = TRUE)
    }

The function can be tested with:

library(s2dverification)
source("./R/Composite.R")
var <- 1 : (5 * 6 * 7)
dim(var) <- c(x = 5, y = 6, time = 7)                                    
occ <- c(1, rep (2, 6))
res <- Composite(var, occ)
str(res)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-composite