knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
fivbvis provides an R client to the FIVB VIS web service system.
You can install fivbvis with:
options(repos = c(openvolley = "https://openvolley.r-universe.dev", CRAN = "https://cloud.r-project.org")) install.packages("fivbvis") ## or install.packages("remotes") ## if needed remotes::install_github("openvolley/fivbvis")
Fetch list of tournaments:
library(fivbvis) all_tournaments <- v_get_volley_tournament_list() nrow(all_tournaments)
## extra code to make sure that the README renders as if it was started in a fresh session each time library(fivbvis) v_options(verbose = FALSE) chd <- tempfile() dir.create(chd) v_cache_dir(chd) all_tournaments <- v_get_volley_tournament_list() nrow(all_tournaments)
Get details for a specific tournament:
v_get_volley_tournament(1)
By default, results are cached in a per-session cache, so if we make the same request again the local results are used, rather than re-downloading:
v_options(verbose = TRUE) v_get_volley_tournament(1)
Known issues:
internal error: Huge input lookup
This indicates that the XML response from the FIVB server is too large or deeply nested and is causing the parser to fail. By default the parser restricts the nesting level that it allows, in order to prevent crashes or other undesirable behaviour. But you can remove this restriction by:
v_options(huge_xml = TRUE)
and then try your request again.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.