I am creating an R package and now working on the NEWS
file. I have an .Rd
file in the inst
subfolder which I would like to be called by a customised function like my_pckg_news()
. I saw this in the gamlss
package which has gamlssNews()
as the customised function that calls a NEWS.txt
file.
So could I create a similar function such that, when calling this function shall display the NEWS.Rd
file in the help section of RStudio? the way we have ?function_name
displaying the respective Rd
file.
Edit : added the sample .Rd file
\name{my_package}
\title{News for package \pkg{my_package}}
\section{}{
\itemize{
\item item1
}
}
\section{Version 0.1}{
\subsection{f1}{
\itemize{
\item item1
\item item2
}
}
\subsection{f2}{
\itemize{
\item item1
}
}
}
Another problem I'm facing here is that, f1
, f2
doesn't get printed . and this file doesn't get loaded on the Help section(of RStudio
) , rather gets directly printed to the R
console