Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R render Rd using roxygen2 without roxygen2 version

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?

like image 664
jangorecki Avatar asked Apr 18 '15 00:04

jangorecki


Video Answer


1 Answers

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
like image 164
Jthorpe Avatar answered Sep 22 '22 23:09

Jthorpe