Learn R Programming

libbib (version 1.6.4)

set_lb_date: Set special libbib date attribute on object

Description

Takes an object and a date and sets a special attribute, "lb.date" by reference

Usage

set_lb_date(x, value)

Value

Nothing, since the object is modified by reference.

Arguments

x

An object to set the attribute on

value

Either a value of class Date or a string in ISO 8601 date format (yyyy-mm-dd) which will be converted into a Date

Examples

Run this code
set_lb_date(mtcars, "2021-05-08")
attributes(mtcars)$lb.date
# [1] "2021-05-08

set_lb_date(mtcars, Sys.Date())

Run the code above in your browser using DataLab