Skip to contents

Function that retrieves a list of function

Usage

retrieve(list_val, val)

Arguments

list_val

List to extract the entry val from

val

Name of the list entry to recover as a vector

Value

The entry val from list_val as vector

Examples

if (exists("CLIENT_ID") & exists("CLIENT_SECRET")) {
  # Generated token
  token <- get_token(CLIENT_ID, CLIENT_SECRET)
  val <- "title"
  search_results <- icd11_search(token, "HIV stage 4")
  search_results |> retrieve("title")
}
#>  [1] "HIV disease clinical stage 4 associated with tuberculosis, unspecified"                                                                
#>  [2] "Other specified HIV disease clinical stage 4 associated with tuberculosis"                                                             
#>  [3] "HIV disease clinical stage 4 associated with malaria, unspecified"                                                                     
#>  [4] "Other specified HIV disease clinical stage 4 associated with malaria"                                                                  
#>  [5] "HIV disease clinical stage 4 without mention of tuberculosis or malaria, unspecified"                                                  
#>  [6] "Dementia due to human immunodeficiency virus [HIV disease clinical stage 4 associated with tuberculosis, unspecified]"                 
#>  [7] "Other specified HIV disease clinical stage 4 without mention of tuberculosis or malaria"                                               
#>  [8] "Dementia due to human immunodeficiency virus [Other specified HIV disease clinical stage 4 associated with tuberculosis]"              
#>  [9] "Dementia due to human immunodeficiency virus [HIV disease clinical stage 4 associated with malaria, unspecified]"                      
#> [10] "Dementia due to human immunodeficiency virus [Other specified HIV disease clinical stage 4 associated with malaria]"                   
#> [11] "Dementia due to human immunodeficiency virus [HIV disease clinical stage 4 without mention of tuberculosis or malaria, unspecified]"   
#> [12] "Dementia due to human immunodeficiency virus [Other specified HIV disease clinical stage 4 without mention of tuberculosis or malaria]"