Error with insertSource(): “object '.cacheOnAssign' not found”
I am trying to use the function insertSource (new in R 2.12) to update a function that I have made changes on. However, when I use the function in this way: insertSource('filename.R', package = 'mypackage') I get the error: Error in get(this, envir = envp) : object '.cacheOnAssign' not found Unfortunately I can not come up with a simple reproducible example - if one would be helpful, please suggest how I can do it - but I have found that the following code does work: system("echo 'nls <- function(nls) return(nls)' > foo.R") insertSource('foo.R', package = stats) One difference between the