0

I can see my package is installed with library(), but when I load the package from the library, I can't call any of the functions.

> install_github("pdfHarvester", "hansthompson")
> library(pdfHarvester)
> Convert
Error: object 'Convert' not found
> Parse_Tables
Error: object 'Convert' not found
cylondude
  • 1,816
  • 1
  • 22
  • 55
  • its just a custom function from my package. It converts pdfs to page images – cylondude Jan 19 '14 at 22:01
  • Make sure you run `document()` or `roxygenize()` after making changes to the roxygen code. – Dason Jan 19 '14 at 22:09
  • Side note: You should read up on using imports/depends. Making calls to require or library inside of your functions is not the proper way to load packages from within a package. – Dason Jan 19 '14 at 22:22
  • thanks. I'm aware and that is a priority of mine. – cylondude Jan 19 '14 at 22:30

1 Answers1

2

You need to make sure you package actually exports the functions you want to use. This is a package development issue - not an issue with install_github.

Note that your NAMESPACE file is empty: https://github.com/hansthompson/pdfHarvester/blob/master/NAMESPACE

It looks like you're using roxygen for your .R files. If you're using devtools for the package creation you need to use document() to generate your help file and populate the NAMESPACE file.

Dason
  • 60,663
  • 9
  • 131
  • 148
  • Might be worth mentioning `document(pkg)` as the necessary step to populate the `NAMESPACE` and help files. – mnel Jan 19 '14 at 22:10
  • True - I added that as a comment to the question but it would be worth mentioning in the answer. – Dason Jan 19 '14 at 22:11