cmd_list_keep_named: Keep items by name from list

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

A pipe-friendly wrapper around list[(names(list) %in% names].

Usage

1

Arguments

list

an R list

names

vector of names to keep

Details

This function is slightly faster than using cmd_list_keep() to keep items by name.

Value

list keeping only items defined by names

Examples

1
cmd_list_keep_named(list("a" = 1, "b" = 2), "a")

snystrom/dotargs documentation built on Oct. 18, 2020, 8:39 a.m.