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)

Arguments

fields

Character vector. Vector of names in the list.

index

List.

Author

Ivan Jacob Agaloos Pesigan

Examples

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"