merge_lists: Compare and merge two lists

Description Usage Arguments Value Author(s) Examples

View source: R/merge_lists.R

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

1

Arguments

a

the 1st list

b

the 2nd list

Value

a list containing the merged configuration

Author(s)

Hanming Tu

Examples

1
2
3
4
5
6
7
8
9
  a <- "https://github.com/phuse-org/phuse-scripts/raw/master"
  b <- "development/R/scripts"
  c <- "Draw_Dist_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)

phuse documentation built on Sept. 21, 2018, 6:35 p.m.