R/parse_promoted_candidates.R

Defines functions parse_promoted_candidates

#' @title Parse Promoted Candidates
#' @description return subset of candidates that are promoted candidates
#' @param candidates list of candidates
#' @export
parse_promoted_candidates <- function(candidates){
  promoted_by <- sapply(candidates, 'getElement', PT$PROMOTED_URI)
  promoted_idxs <- which(!sapply(promoted_by, 'is.null'))
  candidates[promoted_idxs]
}
Display-Lab/pictoralist documentation built on April 1, 2020, 1:25 a.m.