How to call R Script from CRAN description file?

Hi,

I have a package which is dependent on some file. So, I have written a script to download the file and set the env's.

But how to call that file from the description file?

Thanks,
sai

Even I am facing same problem. I need to download some file if not present from HTTPS website and then continue with the Build or package installation process.

There exist different places where you can hook into the installation process: You could use configure(.win) or, if the package contains compiled code, Makevars(.win). The latter approach is used by many packages to download static libraries on Windows, e.g. https://github.com/jeroen/curl/blob/master/src/Makevars.win.

2 Likes

Hi,
Plz forgive if I sound ridiculous as I am new to R. But how to use this in my package? How will I add this to my package binary so that during installation the .win file is called? Hope I have made my self clear.

Thanks for the help !

The configure(.win) file is called during installation of a source package, which is the same process used to create a binary package from a source package, c.f. https://cran.r-project.org/doc/manuals/R-exts.html#Configure-and-cleanup. So with this approach the file will become part of the binary package.