I have a R script that calls the updatePackages() function in MiniCRAN which in turn calls these functions:
updatePackages (miniCRAN) -> oldPackages (miniCRAN) -> pkgAvail (miniCRAN) -> read.dcf (base)
I wish to create my custom read.dcf function that slightly modifies the original read.dcf function and so that when it's run the pkgAvail function will call my custom read.dcf instead of the default read.dcf function. I've defined the function in my script before running the updatePackages function:
read.dcf <- function(file,...) { my modified code }
...
library(miniCRAN); updatePackages();
But when I ran the script it's still giving me the same error that suggests the original read.dcf function was still being called. Do I have to do anything extra in my code to ensure this particular read.dcf function is called by oldPackages? What would be the easiest way to make this work?
Thanks