r - functions not loaded from homebuilt package -


i'm learning build own packages using rstudio. current .tar.gz package (named steensubsspec) here. build & reload command appears build & roxygen-ize package successfully. however, functions not appear loaded memory, despite fact build & reload updates documentation. doing wrong?

build & reload give following output:

==> roxygenize('.', roclets=c('rd')) 
  • checking changes ... done

==> r cmd build steensubsspec

* checking file ‘steensubsspec/description’ ... ok * preparing ‘steensubsspec’: * checking description meta-information ... ok * excluding invalid files subdirectory 'r' contains invalid file names:   ‘2013_08_30_report-concordance.tex’ ‘2013_08_30_report.rnw’   ‘2013_08_30_report.log’ ‘2013_08_30_report.pdf’   ‘2013_08_30_report.synctex.gz’ ‘2013_08_30_report.tex’ * checking lf line-endings in source , make files * checking empty or unneeded directories removed empty directory ‘steensubsspec/inst’ * building ‘steensubsspec_1.0.tar.gz’  source package written ~/dropbox/[my directory] 

this updates documentation: ?write_paper() displays current documentation expected. however

require(steensubsspec)  write_paper()  

gives error: not find function "write_paper"

some things seem correct:

  • all function files in r directory, , have same name definition (e.g /r/write_paper.r defines write_paper() <- function {...
  • the description file contains names of relevant function files: collate: ... 'write_paper.r

how can troubleshoot this?

most likely, functions not exported namespace file (which state empty).

in rstudio, under "build tools" in "project options", make sure "generate documentation roxygen" checked. then, click on "configure". make sure "use roxygen generate namespace file" checked.

in r function files, add @export yourfunctionname in there (or, technically, #' @export yourfunctionname), , when build , reload, namespace file should updated , functions should no longer invisible.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -