tar_pep_foreach: Target factory for arbitrary functions on PEP samples

Description Usage Arguments

View source: R/resource_projects.R

Description

This target factory creates a target for each element of a PEP. You can name the targets using a pattern that uses brackets to indicate sample attributes, like 'sample_name'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
tar_pep_foreach(
  p,
  tpattern,
  func,
  argvals_pattern,
  argtypes,
  argnames = NULL,
  combine_tname = NULL,
  combine_func_name = "list"
)

Arguments

p

PEP.

tpattern

Target name, with patterns allowed

func

Function to call

argvals_pattern

List of arg values, with patterns allowed

argtypes

List of arg types (use 'symbol' for targets)

argnames

List of arg names

combine_tname

Target name for a combined target that merges all of the individual targets

combine_func_name

Character vector of a function that will combine them.


databio/unitar documentation built on May 21, 2021, 11:25 p.m.