util_list2vector: List to Vector

Description Usage Arguments Author(s) Examples

View source: R/util_list2vector.R

Description

Extracts items from a list and returns a vector. Note that this only works with lists that follows the structure in the example below.

Usage

1
util_list2vector(fields, index)

Arguments

fields

Character vector. Vector of names in the list.

index

List.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
index <- list(
  firstname = "Ivan Jacob",
  lastname = "Pesigan",
  province = "BC",
  number = 27
)
util_list2vector(
  fields = c(
    "firstname",
    "lastname",
    "province",
    "number"
  ),
  index = index
)

jeksterslabds/jeksterslabRutils documentation built on Jan. 18, 2021, 11:41 p.m.