Two problems here.
- function names are case-sensitive (
checkTriangle
, not checktriangle
)
checkTriangle
is not exported from the package (i.e., it's a private function intended for use within the package only), so you need :::
to access it ... try ChainLadder:::checkTriangle
.
Using private functions is "at your own risk/programmer beware"; private functions are undocumented, may change in future versions, etc.. If you can find a way to do what you need to do with public functions, that is generally preferred.
AFAICT you're running into this problem because you're trying to source()
(or cut-and-paste) package code in your R session. This shouldn't happen if you load the package with library("ChainLadder")
and use the public functions (if it does, please edit your question to give a little more context about how you're using the package ...)