README.md

golEMTEST

The goal of golEMTEST is to let you comptete with your friends in predicting the results of sports events.

Use the package by completing the following steps:

  1. Install the package ADD REFEENCES
  2. Create a league
  3. Add a data source
  4. Have fun competing with your friends in predicting results for sports events

Create a league

Use create_league_r() or create_league_cmd() to set up a directory structure to store user provided predictions. create_league()_r is run from R and create_league_cmd() is run from the terminal using R_CMD...

Add a data source

You should specify a data source for your app. Whatever you specify should just return a tibble with the following fields …

Install golEMTEST as a package. Call a function that sets up the webscraper into the global.R file. Use golem::set_golem

Either a csv file R program that scrapes some results

Point to

  1. Create league
  2. Point to this place inside run_app()
  3. add input data-source in app.R file

What happens when run_app() is called?

  1. The app is called with the parameter to_database which points to the place where the database have been setup. At start up the app will load the usernames and encrypted passwords from to_database/meta.csv and use this to load in all the user predictions into memory. WRITE FUNCTIONS THAT HANDLE THIS INDSIDE THE PACKAGE. ONE ARGUMENT WHICH IS THE PATH PROVIDED AT RUNTIME WITH GOLEM OPTS

  2. Fetch the data on the games you have placed predictions on and on the games to come.

  3. Join the user data with the league data and calculate scores.

Installation

You can install the released version of golEMTEST from CRAN with:

#install.packages("golEMTEST")

And the development version from GitHub with:

# install.packages("devtools")
#devtools::install_github("AndersT123/shiny-server")

Example

This is a basic example which shows you how to solve a common problem:

#library(golEMTEST)
## basic example code

What is special about using README.Rmd instead of just README.md? You can include R chunks like so:

summary(cars)
#>      speed           dist       
#>  Min.   : 4.0   Min.   :  2.00  
#>  1st Qu.:12.0   1st Qu.: 26.00  
#>  Median :15.0   Median : 36.00  
#>  Mean   :15.4   Mean   : 42.98  
#>  3rd Qu.:19.0   3rd Qu.: 56.00  
#>  Max.   :25.0   Max.   :120.00

You’ll still need to render README.Rmd regularly, to keep README.md up-to-date.

You can also embed plots, for example:

In that case, don’t forget to commit and push the resulting figure files, so they display on GitHub!



AndersT123/betr documentation built on March 3, 2021, 1:48 a.m.