insert_methods {r6methods} | R Documentation |
Insert Methods
Description
Insert Methods
Usage
insert_methods(
content,
start_pos = 1,
field = c("all", "public", "private"),
method = c("both", "get", "set"),
add_roxygen = TRUE
)
Arguments
content |
Character, content of the file or a string |
start_pos |
Integer, position of cursor within 'content'. Number of characters before the cursor. |
field |
Character, fields for which to create method. May be "all", "public", "private" or name of class field. Multiple values allowed. |
method |
Character, methods to create. One of "both", "get", "set" |
add_roxygen |
Logical, whether to add roxygen description of method |
Value
Character, modified content
with injected methods
[Package r6methods version 0.1.0 Index]