Extracts items from a list and returns a vector. Note that this only works with lists that follows the structure in the example below.
util_list2vector(fields, index)
fields | Character vector. Vector of names in the list. |
---|---|
index | List. |
Ivan Jacob Agaloos Pesigan
index <- list( firstname = "Ivan Jacob", lastname = "Pesigan", province = "BC", number = 27 ) util_list2vector( fields = c( "firstname", "lastname", "province", "number" ), index = index )#> firstname lastname province number #> "Ivan Jacob" "Pesigan" "BC" "27"