0

I’ve been testing R Markdown recently so this may be a very basic question but haven’t been able to find a solution.

I wrote a custom package with several functions I routinely use for some analysis I have to do for my work. If I run the script as an R script it runs with no problem. When I embed the same code within an r chunk in a notebook is doesn’t run.

I’m sure I missing something when building my package but can’t find what. I found some references on how to call external R scripts but nothing really related to custom-made packages.

I would appreciate any hint...

Best,

Christian

Ralf Stubner
  • 25,305
  • 3
  • 37
  • 71
Christian
  • 11
  • 1
  • How did you install your custom made package? Do you get any error messages? – Ralf Stubner Sep 12 '19 at 05:34
  • Hi Ralf; I created the binary file in RStudio and then install it from a zip file. No errors are reported. I’m wondering if has anything to do with something I may be missing in the NAMESPACE... – Christian Sep 12 '19 at 11:12
  • What does "in a notebook is doesn't run" mean *exactly* if there are no error messages? If that does not reveal any hints, we will need a precise step-by-step guide detailing how who build and installed a (minimal) package and called it from R Markdown. – Ralf Stubner Sep 12 '19 at 11:38
  • 1
    I think I found what the problem is. It is described here: https://stackoverflow.com/questions/34029611/how-to-use-objects-from-global-environment-in-rstudio-markdown – Christian Sep 13 '19 at 00:42

0 Answers0