Learn R Programming

libbib (version 1.6.4)

cp_lb_attributes: Copy special libbib attributes from one object to another

Description

Takes two objects and copies all special libbib attributes (attributes beginning with lb.) from the first object to the second, by reference.

Usage

cp_lb_attributes(a, b)

Value

Nothing, since the object is modified by reference.

Arguments

a

The first object (the one with the attributes to copy)

b

The second object (the one to copy those attributes to)

Examples

Run this code

tmp1 <- "a"
set_lb_date(tmp1, "2021-05-08")
set_lb_attribute(tmp1, "note", "just an example")

tmp2 <- "b"
cp_lb_attributes(tmp1, tmp2)
attributes(tmp2)$lb.date
# [1] "2021-05-08"
attributes(tmp2)$lb.note
# [1] "just an example"

Run the code above in your browser using DataLab