add_comments: Add Comments to Character Strings.

Description Usage Arguments Value Note See Also Examples

Description

This operator allows you to add comments to character strings.

Usage

1
2
3
x %:)% y

x %comment% y

Arguments

x

A character string that is to be commented.

y

A character string (the comment).

Value

Returns a character string of the class subcom with a comment added as a "comment" attribute.

Note

The operator, %:)%, is a simple smiley face emotion because commented code is happy code.

See Also

comment

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
a <- "The character string"
b <- "The comment"

(out <- a %:)% b)
attributes(out)
comment(out)

minimal <- construct("a", "b", "c" %:)% "A love note to your future self")
minimal
comments(minimal)

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