14
votes

Auto-documentation feature using roxygen2, while it is great and useful, it is annoying on every change of roxygen2 package version. It updates all my documentation files by putting roxygen2 version inside each file. See below.

% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/src.R

Such changes obviously don't affect the code/package but did affect source control versioning by adding a noise to your source versioning process.
Could it be turned off somewhere?

1
Post you PR as an answer. At Least this question will be answered and could be useful for other people to know it solved. - David Arenburg
@DavidArenburg I will wait till be bounty finish as I cannot get my own bounty. Maybe roxygen devs make it fast and grab the bounty :) - jangorecki
Sorry to ask a dumb question, but what is PR? - Jthorpe
@Jthorpe Pull Request, the mentioned one is here - jangorecki

1 Answers

2
votes

This probably borders on cheating, but if you redefine packageVersion() priot to compiling your package, like so:

packageVersion  <- function(pkg,...)()
    if(pkg == "roxygen2") "Hello World" else utils::packageVersion('pkg',...)

You'll get:

% Generated by roxygen2 (Hello World): do not edit by hand

instead of

% Generated by roxygen2 (4.1.1): do not edit by hand