R Markdown could not find function

3.5k views Asked by At

Running Compile Notebook from RStudio.

I am getting:

Error: could not find function "SegNeigh"

"SegNeigh" being my own function, properly sourced; the script runs fine without R Markdown.

Any help appreciated.

1

There are 1 answers

1
DeanAttali On BEST ANSWER

In order for the rmarkdown doc to find the function, you either need to define SegNeigh in the same document or place it in another file and source that file explicitly