Comments (4)
If these downloads are not small, an improvement would be to cache them for the current session under R's temporary directory. In this way, it would be easier to enable an option so that the user can specify a permanent cache directory.
Alternatively, tools::R_user_dir
returns an appropriate directory in every platform to cache data permanently. This is essentially the same functionality as the rappdirs
package provides, which was ported to R.
from nfl4th.
Yes, I realize this is annoying, sorry. The reason for this is that CRAN has a very strict package size limit that the models included in nfl4th
exceed, so the package has to load these models externally and there's no way to make it work without internet connectivity.
An option for not using the package itself is just getting the pre-computed data here.
from nfl4th.
Yes, I know the CRAN policy. My suggestion would be to provide a function that the user needs to call in order to download that data and place it under the user dir, instead of doing that on package load. But yet again, that's a suggestion. :)
The reason for this request is that I have an RPM repository for Fedora with all (most) CRAN packages and this one cannot be built due to this issue. For now, I had to remove nfl4th and nflverse (which depends on nfl4th) for now.
If you decide to address this, please let me know to add them back.
from nfl4th.
Instead of loading the files on load we could add something like this to the package and call it from inside the other functions
init_nfl4th <- function() {
pkg_env <- ls("package:nfl4th")
if (!".games_nfl4th" %in% pkg_env){
.games_nfl4th <- get_games_file()
assign(".games_nfl4th", .games_nfl4th, envir = parent.env(environment()))
}
if (!"fd_model" %in% pkg_env){
fd_model <- load_fd_model()
assign("fd_model", fd_model, envir = parent.env(environment()))
}
}
from nfl4th.
Related Issues (12)
- Release nfl4th 1.0.0 HOT 2
- Release nfl4th 1.0.1 HOT 2
- bump minimum nflreadr version to 1.2.0+ HOT 1
- Release nfl4th 1.0.2
- Take tidyverse out of Suggests
- Release nfl4th 1.0.3
- CRAN doesn't allow us to use `rappdirs::user_cache_dir()`
- Release nfl4th 1.0.4
- Release nfl4th 1.0.1 HOT 1
- gt nonense
- Recommendation strength: Log odds vs Percentage Points HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nfl4th.