Open jacobakaye opened 4 months ago
Restart R, install the development version of ffscrapr and try again: https://ffscrapr.ffverse.com/#installation
Same issue.
> install.packages("ffsimulator", repos = "https://ffverse.r-universe.dev")
trying URL 'https://ffverse.r-universe.dev/bin/macosx/big-sur-arm64/contrib/4.3/ffsimulator_1.2.3.01.tgz'
Content type 'application/x-gzip' length 4065674 bytes (3.9 MB)
==================================================
downloaded 3.9 MB
The downloaded binary packages are in
/var/folders/m0/0lm826c563q6bvzjkyh472wh0000gn/T//RtmpOaK5yp/downloaded_packages
> install.packages("ffsimulator", repos = "https://ffverse.r-universe.dev")
trying URL 'https://ffverse.r-universe.dev/bin/macosx/big-sur-arm64/contrib/4.3/ffsimulator_1.2.3.01.tgz'
Content type 'application/x-gzip' length 4065674 bytes (3.9 MB)
==================================================
downloaded 3.9 MB
The downloaded binary packages are in
/var/folders/m0/0lm826c563q6bvzjkyh472wh0000gn/T//RtmpOaK5yp/downloaded_packages
There were 18 warnings (use warnings() to see them)
> pak::pak("ffverse/ffsimulator")
! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
✔ Loading metadata database ... done
ℹ No downloads are needed
✔ 1 pkg + 40 deps: kept 41 [4.9s]
> remotes::install_github("ffverse/ffsimulator")
Downloading GitHub repo ffverse/ffsimulator@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/m0/0lm826c563q6bvzjkyh472wh0000gn/T/RtmpOaK5yp/remotesb5316435c7f8/ffverse-ffsimulator-838897a/DESCRIPTION’ ...
─ preparing ‘ffsimulator’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘ffsimulator_1.2.3.01.tar.gz’
* installing *source* package ‘ffsimulator’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (ffsimulator)
> library(ffsimulator)
> library(ggplot2)
> library(ggridges)
> espn_conn <- espn_connect(season = 2023, league_id = 352072624)
> mfl_sim <- ff_simulate(conn = espn_conn, n_seasons = 100)
── Starting simulation 2024-02-19 14:58:00.638701 ───────────────────────────────────────────────────────────────────────────────────
✔ Importing data ... done
Note: nflreadr caches (i.e., stores a saved version) data by default.
If you expect different output try one of the following:
ℹ Restart your R Session or
ℹ Run `nflreadr::.clear_cache()`.
To disable this warning, run `options(nflreadr.verbose = FALSE)` or add it to your .Rprofile
This message is displayed once every 8 hours.
✔ Generating Projections ... done
✔ Calculating Roster Scores ... done
✔ Optimizing Lineups ... done
✔ Building Schedules ... done
✔ Summarising Simulation Data ... done
── Simulation complete! 2024-02-19 14:58:24.3793 ────────────────────────────────────────────────────────────────────────────────────
> plot(mfl_sim)
mfl_sim <- ff_simulate(conn5, n_seasons = 500) ── Starting simulation 2024-05-19 20:51:16.416035 ────────────────────────────────────────────────────────────── ✔ Importing data ... done ✔ Generating Projections ... done Error: 'unnest.' is not an exported object from 'namespace:tidytable'
Same issue.
> install.packages("ffsimulator", repos = "https://ffverse.r-universe.dev") > pak::pak("ffverse/ffsimulator") > remotes::install_github("ffverse/ffsimulator")
Looks like you installed the development version of ffsimulator, where you needed the development of ffscrapr as well
mfl_sim <- ff_simulate(conn5, n_seasons = 500) ── Starting simulation 2024-05-19 20:51:16.416035 ────────────────────────────────────────────────────────────── ✔ Importing data ... done ✔ Generating Projections ... done Error: 'unnest.' is not an exported object from 'namespace:tidytable'
@sillebt Please install the development version of ffsimulator for this problem and/or open a new issue, this is unrelated to the issue from OP
having this issue now:
> library(ffsimulator)
Error: package or namespace load failed for ‘ffsimulator’:
.onLoad failed in loadNamespace() for 'nflreadr', details:
call: fun(libname, pkgname)
error: lazy-load database '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cachem/R/cachem.rdb' is corrupt
In addition: Warning messages:
1: In fun(libname, pkgname) : restarting interrupted promise evaluation
2: In fun(libname, pkgname) : internal error -3 in R_decompress1
Hm. This looks like a corrupted install, I would restart R to a clean session and try installing again
Now I have this issue...
> espn_conn <- espn_connect(season = 2023, league_id = 352072624)
> mfl_sim <- ff_simulate(conn = espn_conn, n_seasons = 100)
── Starting simulation 2024-05-20 18:28:21.576716 ─────────────────────────────────────────────────────────────────────────────────
✔ Importing data ... done
Error in espn_getendpoint_raw(conn, url_query, xff) :
object 'parsed' not found
In addition: Warning message:
ESPN API did not return json while calling https://fantasy.espn.com/apis/v3/games/ffl/seasons/2023/segments/0/leagues/352072624?view=mSettings
Hrm. ESPN API had some issues earlier, will need to investigate
Sounds good. Thanks
Is that a fix?
Describe the bug plot not outputting correctly.
Reprex
Expected behavior Show correct plot w/ team names. League name importing correctly.
Session information Please copy the output of
sessionInfo()
into the box below.Screenshots
Additional context Add any other context about the problem here.