Learn R Programming

cmdfun (version 1.0.2)

cmd_list_drop_named: Drop items by name from list

Description

A pipe-friendly wrapper around list[!(names(list) %in% names)] This function is slightly faster than using cmd_list_drop() to drop items by name.

Usage

cmd_list_drop_named(list, names)

Arguments

list

an R list

names

vector of names to drop

Value

list removing items defined by names

Examples

Run this code
# NOT RUN {
cmd_list_drop_named(list("a" = 1, "b" = 2), "a")
# }

Run the code above in your browser using DataLab