Referring to other function inside a local R package
<p>I'm writing a local package that I intend to use for analysis (instead of using a script like I did until now). I have some trouble understanding R's way of sourcing/scoping this way. say I have a R/some_functions.R file, which contains:</p>

<pre><code>#' function a
#' @export
a &lt;- function(a) {
  print(a)
}

#' function b, not exporting
b &lt;- function(b) {
  print(b)
}

#' function c
cc &lt;- function() {
  a("cat") # will run
  b("dog") # will not run, can't find function.
}
</code></pre>

<p>I understand that function "a" is accessible through the NAMESPACE when I install/load the package, but I still expected function "b" to be available internally. Since I'm the only intended user of the package I can export all , but I want to know the right approach.
just export? sourcing? using devtools::load_all?</p>

<p>EDIT: by dummy code was not good enough. modified it. I think the source of my misunderstanding was that I was expecting code to be attached, which is obviously not the case.</p>