Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I have the NEWS displayed in the html help page of an R package?

Tags:

r

The help page of the news() R function says:

it is attempted to read its news in structured form from files ‘inst/NEWS.Rd’, ‘NEWS’ or ‘inst/NEWS’ (in that order).

Doing so and installing the package, we get (under windows) a link to the NEWS file at the top of the html page open by the command help(package=packagename). For an example, assuming you have installed party, you can try

help(package="party")

This works however only with files named NEWS. When we provide instead a NEWS.Rd file, there is no link to the news. Try

help(package="survival")

Is there a way to get this link when we provide a NEWS.Rd file?

Thanks for your help.

like image 983
Gilbert Avatar asked Nov 12 '22 10:11

Gilbert


1 Answers

The problem has been solved since R 3.0.0.

It seems, however, that a series of the Rd formatting code such as \code{} for example are ignored when rendering the NEWS.Rd in html.

like image 116
Gilbert Avatar answered Nov 15 '22 05:11

Gilbert