split_on_name: Helper function to split a list on a named args

Description Usage Arguments Value

Description

Specifically used for splitting a call's arguments based on the location of a specified argument name to use the placement of the arguments to represent useful information.

Usage

1
split_on_name(l, split_name, omit.named = TRUE)

Arguments

l

list to split

split_name

name of element in list to split on. If the element is not found in the list, the returned list will contain the entirety of the passed list, l, in the name 'left' and an empty list in the name 'right'.

omit.named

logical indicating whether the list value specified by split_name should be included in the output lists.

Value

A named list with two named values, "left" and "right", indicating arguments to the left and right of the split_name argument.


lengning/gClinBiomarker documentation built on May 9, 2019, 2:55 p.m.