mpjashby/crimemapping

Increase timeout on update function

Closed this issue · 3 comments

The package file is quite large so updating often fails on slow connections.

remotes::install_github() uses base::download.file() to download the package from GitHub. The only way to increase the default 60-second timeout on download.file() seems to be using option(), which is bad practice inside package.

The best way to deal with this may be to use http::GET() instead, but this introduces a new dependency.

The other way to reduce the problem of installation timing out is to minimise the size of the package, which can most usefully be achieved by removing the large data files in the package -- see #33

This was dealt with by refactoring the whole update() function in cbe69d0