Learn R Programming

tagtools (version 0.2.0)

merge_fields: Merge the fields of two lists

Description

This function is used to merge the fields of two lists. If there are duplicate fields, the fields in s1 are taken.

Usage

merge_fields(s1, s2)

Value

A list containing all of the fields in s1 and s2

Arguments

s1

Arbitrary list e.g., containing metadata or settings.

s2

Arbitrary list e.g., containing metadata or settings.

Examples

Run this code
s1 <- list(a = 1, b = c(2, 3, 4))
s2 <- list(b = 3, c = "cat")
s <- merge_fields(s1, s2)

Run the code above in your browser using DataLab