comment {base}R Documentation

Query or Set a 'Comment' Attribute

Description

These functions set and query a comment attribute for any R objects. This is typically useful for data.frames or model fits.

Contrary to other attributes, the comment is not printed (by print or print.default).

Usage

comment(x)
comment(x) <- value

Arguments

x any R object
value a character vector

See Also

attributes and attr for “normal” attributes.

Examples

x <- matrix(1:12, 3,4)
comment(x) <- c("This is my very important data from experiment #0234",
                "Jun 5, 1998")
x
comment(x)

[Package base version 2.1.0 Index]