Roxygen2 now fully supports S4 and RC (reference classes) - you should no
longer need to manually add
@usage tags for S4 classes, methods
and generics, or for RC classes.
- The default usage definitions are much better, generating the correct
usage for data sets (#122), S3 methods (without additional
S4 generics, S4 methods, and for replacement (#119) and infix functions.
Backslashes in function arguments in are correctly escaped. Usage statements
also use a more sophisticated line wrapping algorithm so that they should
cause fewer problems with the R CMD check line limit. (#89, #125).
- S4 classes, S4 methods, and RC classes are given better default topics,
and the file names corresponding to those topics are shorter.
- S4 methods will automatically inherit parameter documentation from their
@slot name descriptionallows you to document the slots of a S4 class.
S3 support has also been improved: roxygen2 now figures out whether a function
is a S3 method or generic. (In the rare cases it does so incorrectly, use
@method to manually describe the generic and class associated with a method).
This means you can remove existing uses of
@method, and can replace
Roxygen now has support for package specific options through the
field in the
DESCRIPTION. The value of the field should be R code that
results in a list. Currently only
roclet values are supported:
- Turn off Rd re-wrapping with adding
Roxygen: list(wrap = FALSE)
- Change the default roclets by specifying
Roxygen: list(roclets = c("collate", "rd"))
Roxygen 3.0 also includes a number of minor fixes and improvements:
- Infix functions are now escaped correctly in the
NAMESPACE. (Thanks to
roxygenise()now works more like
devtools::document()and only ever works
in the current directory. The arguments
unlink.targethave been deprecated due to potential
data loss problems.
- The collate roclet is no longer a roclet: it processes R files using custom
code (only statically, not dynamically) and is designed to be executed before
the code is sourced. Run
update_collate()to update the Collate directive
@includetags - if there are none present, a collate directive
will not be generated.
@useDynLibnow works with more possible specifications - if you include a
comma in the tag value, the output will be passed as is. This means that
@useDynLib mypackage, .registration = TRUEwill now generate
useDynLib(mypackage, .registration = TRUE)in the NAMESPACE. (#124)
instdirectory not created by default (#56).
- Explicitly depend on
methodspackages to make roxygen
digestpackage instead of
depending on it.
- Always use C locale when sorting
NAMESPACEfile or tags in
This ensures a consistent ordering across systems (#127).
- Templates with extension
.rare supported on case-sensitive file systems
(#115). Template variables now actually work (#160, thanks to @bronaugh).
- Suppress default aliases, format and usage with