Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

roxygenise just one .R file to add the file and its documentation to a package

Tags:

r

roxygen2

I created a package and pushed it up to github, such that the devtools function install_github() function works for easy installation. i.e. the github repo file structure is such that the DESCRIPTION and NAMESPACE are at the top along with /R and /man folders that contain the *.R files and *.Rd files respectively for each function.

I now want to make some upgrades to it by adding in new functions.

I have all the relevant roxygen type (#') text above the function in each new .R file, but can't find the roxygen2 or otherwise relevant package function that will help read the .R file and write the relevant .Rd file hopefully this isn't too difficult... I think what I am asking for is, is possible to roxygenise just one file to add onto another existing package? so that it updates the DESCRIPTION, NAMESPACE files as well. so that i can just add, commit and push all these changes up to the remote repo on github?

like image 492
h.l.m Avatar asked Nov 13 '12 07:11

h.l.m


1 Answers

Are you looking for the document function from devtools? This will create .Rd files from source in mylibrary/R.

It also updates DESCRIPTION and NAMESPACE.

like image 133
Spacedman Avatar answered Sep 29 '22 02:09

Spacedman