merge_lists: Compare and merge two lists

View source: R/merge_lists.R

merge_listsR Documentation

Compare and merge two lists

Description

compare two lists using the first list as a base; update the values of the first list if the second one has different values; add varibles to the first if they doe not exist in the first list.

Usage

merge_lists(a, b)

Arguments

a

the 1st list

b

the 2nd list

Value

a list containing the merged configuration

Author(s)

Hanming Tu

Examples

## Not run: 
  a <- "https://github.com/phuse-org/phuse-scripts/raw/master"
  b <- "development/R/scripts"
  c <- "Draw_Dist1_R.yml"
  f1 <- paste(a,b,c, sep = '/')
  dr <- resolve(system.file("examples", package = "phuse"), "02_display")
  f2 <- paste(dr, "www", "Draw_Dist_R.yml", sep = '/')
  r1 <- read_yml(f1)
  r2 <- read_yml(f2)
  r3 <- merge_lists(r1, r2)

## End(Not run)

TuCai/phuse documentation built on Sept. 2, 2022, 5:17 a.m.