comments: Get/Set Comments From a regexr Object

Description Usage Arguments Value Examples

View source: R/comments.R

Description

comments - Get the comments from a regexr object.

comments<- - Set the comments of a regexr object.

set_comments - This is a convenience function that sets the comments on a regexr object and returns the object.

Usage

1
2
3
4
5
comments(x, ...)

comments(x) <- value

set_comments(x, y)

Arguments

x

A regexr object.

value

The comment(s) to assign.

y

The comments to assign.

...

Ignored.

Value

comments - Returns a list of comments.

set_comments - Returns a regexr object.

Examples

1
2
3
4
5
6
7
8
9
minimal <- construct("a", "b", "c" %:)% "Comment #3")
minimal
comments(minimal)
comments(minimal)[2] <- "A comment"
comments(minimal)

minimal <- construct("a", "b", "c")
out <- set_comments(minimal, paste("comment", 1:3))
comments(out)

regexr documentation built on May 29, 2017, 5:57 p.m.