safe_pluck_list: Safe Pluck List This function is used to safely pluck named...

View source: R/data_manipulation_functions.R

safe_pluck_listR Documentation

Safe Pluck List This function is used to safely pluck named value from a list of named lists. This will return a vector of values the length of the list. If the named list doesn't have the name, an NA will be returned.

Description

Safe Pluck List This function is used to safely pluck named value from a list of named lists. This will return a vector of values the length of the list. If the named list doesn't have the name, an NA will be returned.

Usage

safe_pluck_list(lst, n)

Arguments

lst

A list of named lists

list1 = list( list("name" = "col1", "display_name" = "Column1", "type" = "x"), list("name" = "col2", "type" = "x") )

n

A string. If the string is a name in the named lists, the value of that string will be returned, otherwise NA.


Sage-Bionetworks/projectliveModules documentation built on June 26, 2022, 1:11 a.m.