|
40 | 40 | A short description of the purpose of the function. Usually around |
41 | 41 | a paragraph, but can be longer if needed. |
42 | 42 | template: "\n${1:A short description...}\n" |
43 | | - vignette: rd |
| 43 | + vignette: rd-functions |
44 | 44 | recommend: true |
45 | 45 |
|
46 | 46 | - name: details |
47 | 47 | description: > |
48 | 48 | Additional details about the function. Generally superseded by instead |
49 | 49 | using a level 1 heading. |
50 | 50 | template: "\n${1:Additional details...}\n" |
51 | | - vignette: rd |
| 51 | + vignette: rd-functions |
52 | 52 |
|
53 | 53 | - name: docType |
54 | 54 | description: > |
|
88 | 88 | description: > |
89 | 89 | Embed examples stored in another file. |
90 | 90 | template: ' ${1:path}.R' |
91 | | - vignette: rd |
| 91 | + vignette: rd-functions |
92 | 92 | recommend: true |
93 | 93 |
|
94 | 94 | - name: examples |
95 | 95 | description: > |
96 | 96 | Executable R code that demonstrates how the function works. Code must run |
97 | 97 | without error. |
98 | 98 | template: "\n${1:# example code}\n" |
99 | | - vignette: rd |
| 99 | + vignette: rd-functions |
100 | 100 | recommend: true |
101 | 101 |
|
102 | 102 | - name: examplesIf |
103 | 103 | description: > |
104 | 104 | Run examples only when `condition` is `TRUE`. |
105 | 105 | template: " ${1:condition}\n${2:# example code}\n" |
106 | | - vignette: rd |
| 106 | + vignette: rd-functions |
107 | 107 | recommend: true |
108 | 108 |
|
109 | 109 | - name: export |
|
152 | 152 | description: > |
153 | 153 | Describe a R6 or refClass field. |
154 | 154 | template: ' ${1:name} ${2:description}' |
155 | | - vignette: rd-oop |
| 155 | + vignette: rd-R6 |
156 | 156 | recommend: true |
157 | 157 |
|
158 | 158 | - name: format |
|
161 | 161 | include a description of each column. If not supplied, will be |
162 | 162 | automatically generated by `object_format()`. |
163 | 163 | template: ' ${1:description}' |
164 | | - vignette: rd-data |
| 164 | + vignette: rd-datasets |
165 | 165 | recommend: true |
166 | 166 |
|
167 | 167 | - name: import |
|
257 | 257 |
|
258 | 258 | - name: method |
259 | 259 | description: > |
260 | | - Force a function to be recognised as an S3 method. This affects the |
261 | | - default usage and the `NAMESPACE` directive produced by `@export`. |
262 | | - Only needed if automatic detection fails. |
| 260 | + If ambiguous, clarify which generic an S3 method belongs too. Only needed |
| 261 | + in very rare cases. |
263 | 262 | template: ' ${1:generic} ${2:class}' |
264 | | - vignette: rd-oop |
| 263 | + vignette: rd-S3 |
265 | 264 | recommend: true |
266 | 265 |
|
267 | 266 | - name: name |
|
280 | 279 | description: > |
281 | 280 | Suppress `.Rd` generation for a block. Use for documentation |
282 | 281 | blocks that should only be visible in the source code. |
283 | | - vignette: 'rd' |
| 282 | + vignette: rd-functions |
284 | 283 | recommend: true |
285 | 284 |
|
286 | 285 | - name: note |
|
306 | 305 | Document multiple arguments by separating their names with commas |
307 | 306 | without spaces. |
308 | 307 | template: ' ${1:name} ${2:description}' |
309 | | - vignette: rd |
| 308 | + vignette: rd-functions |
310 | 309 | recommend: true |
311 | 310 |
|
312 | 311 | - name: prop |
313 | 312 | description: > |
314 | 313 | Describe an S7 class property that is not a constructor parameter. |
315 | 314 | template: ' ${1:name} ${2:description}' |
316 | | - vignette: rd-oop |
| 315 | + vignette: rd-S7 |
317 | 316 | recommend: true |
318 | 317 |
|
319 | 318 | - name: R6method |
320 | 319 | description: > |
321 | 320 | Document an R6 method that can't be discovered by introspection, |
322 | 321 | such as methods added via `$set()`. |
323 | 322 | template: ' ${1:Class}$${2:method}' |
324 | | - vignette: rd-oop |
| 323 | + vignette: rd-R6 |
| 324 | + recommend: true |
325 | 325 |
|
326 | 326 | - name: rawNamespace |
327 | 327 | description: > |
|
333 | 333 | description: > |
334 | 334 | Insert literal text directly into the `.Rd` file. |
335 | 335 | template: ' ${1:rd}' |
336 | | - vignette: rd |
| 336 | + vignette: rd-functions |
337 | 337 |
|
338 | 338 | - name: rdname |
339 | 339 | description: > |
|
354 | 354 | description: > |
355 | 355 | Describe the function's output. Superseded in favour of `@returns`. |
356 | 356 | template: ' ${1:description}' |
357 | | - vignette: rd |
| 357 | + vignette: rd-functions |
358 | 358 |
|
359 | 359 | - name: returns |
360 | 360 | description: > |
361 | 361 | Describe the function's output. Typically will be a 1-2 sentence |
362 | 362 | description of the output type, but might also include discussion |
363 | 363 | of important errors or warnings. |
364 | 364 | template: ' ${1:description}' |
365 | | - vignette: rd |
| 365 | + vignette: rd-functions |
366 | 366 | recommend: true |
367 | 367 |
|
368 | 368 | - name: section |
|
384 | 384 | description: > |
385 | 385 | Describe the slot of an S4 class. |
386 | 386 | template: ' ${1:name} ${2:description}' |
387 | | - vignette: rd-oop |
| 387 | + vignette: rd-S4 |
388 | 388 | recommend: true |
389 | 389 |
|
390 | 390 | - name: source |
|
393 | 393 | source (if possible) and briefly describe any manipulation that you |
394 | 394 | performed when importing the data. |
395 | 395 | template: ' ${1:description}' |
396 | | - vignette: rd-data |
| 396 | + vignette: rd-datasets |
397 | 397 | recommend: true |
398 | 398 |
|
399 | 399 | - name: template |
|
414 | 414 | An explicit `@title` is not usually needed as by default it is taken from |
415 | 415 | the first paragraph in the roxygen block. |
416 | 416 | template: ' ${1:title}' |
417 | | - vignette: rd |
| 417 | + vignette: rd-functions |
418 | 418 | recommend: true |
419 | 419 |
|
420 | 420 | - name: usage |
421 | 421 | description: > |
422 | 422 | Override the default usage generated by roxygen2. Only needed when |
423 | 423 | roxygen2 fails to correctly derive the usage of your function. |
424 | 424 | template: ' ${1:fun}(${2:arg1, arg2 = default, ...})' |
425 | | - vignette: rd |
| 425 | + vignette: rd-functions |
426 | 426 | recommend: true |
427 | 427 |
|
428 | 428 | - name: useDynLib |
|
0 commit comments