Install a new challenge.

new_challenge(path = ".", out_rmdfile = "challenge.rmd",
  recursive = FALSE, overwrite = recursive, quiet = FALSE,
  showWarnings = FALSE, template = c("en", "fr"), data_dir = "data",
  submissions_dir = "submissions", hist_dir = "history",
  install_data = TRUE, baseline = "baseline", add_baseline = install_data,
  clear_history = overwrite, title = "Challenge", author = "",
  date = "", email = "EDIT_EMAIL@DOMAIN.com",
  date_start = format(Sys.Date(), "%d %b %Y"),
  deadline = paste(Sys.Date() + 90, "23:59:59"),
  data_list = data_split(get_data("german")))

Arguments

path
string. install path of the challenge (should be somewhere in your Dropbox).
out_rmdfile
string. name of the output R Markdown file.
recursive
logical. should elements of the path other than the last be created? see dir.create.
overwrite
logical. should existing destination files be overwritten? see file.copy.
quiet
logical. deactivate text output.
showWarnings
logical. should the warnings on failure be shown? see dir.create.
template
string. name of the template R Markdown script to be installed. Two choices are available: "en" (english) and "fr" (french).
data_dir
string. subdirectory of the data.
submissions_dir
string. subdirectory of the submissions. see store_new_submissions.
hist_dir
string. subdirectory of the history. see store_new_submissions.
install_data
logical. activate installation of the data files of the template challenge.
baseline
string. name of the team considered as the baseline.
add_baseline
logical. activate installation of baseline submission files of the template challenge.
clear_history
logical. activate deletion of the existing history folder.
title
string. title displayed on the webpage.
author
string. author displayed on the webpage.
date
string. date displayed on the webpage.
email
string. email of the challenge administrator.
date_start
string. start date of the challenge.
deadline
string. deadline of the challenge.
data_list
list with members train, test, y_test and ind_quiz such as returned by the data_split function.

Value

The path of the created challenge is returned.

Examples

path <- tempdir() wd <- setwd(path) # english version new_challenge()
#> New challenge installed in: "/tmp/Rtmp7NoKFA" #> Next steps to complete the installation: #> 1. Replace the data files in the "data" subdirectory. #> 2. Replace the baseline predictions in "submissions/baseline". #> 3. Customize the template R Markdown file "challenge.rmd" as needed. #> 4. Create and share subdirectories in "submissions" for each team: #> rchallenge::new_team("team_foo", "team_bar", path=".", submissions_dir="submissions") #> 5. Render the HTML page: #> rchallenge::publish("./challenge.rmd") #> 6. Give the URL to "challenge.html" to the participants. #> 7. Automate the updates of the webpage. #> On Unix systems, you can setup the following line to your crontab using "crontab -e": #> 0 * * * * Rscript -e 'rchallenge::publish("/tmp/Rtmp7NoKFA/challenge.rmd")'
# french version new_challenge(template = "fr")
#> New challenge installed in: "/tmp/Rtmp7NoKFA" #> Next steps to complete the installation: #> 1. Replace the data files in the "data" subdirectory. #> 2. Replace the baseline predictions in "submissions/baseline". #> 3. Customize the template R Markdown file "challenge.rmd" as needed. #> 4. Create and share subdirectories in "submissions" for each team: #> rchallenge::new_team("team_foo", "team_bar", path=".", submissions_dir="submissions") #> 5. Render the HTML page: #> rchallenge::publish("./challenge.rmd") #> 6. Give the URL to "challenge.html" to the participants. #> 7. Automate the updates of the webpage. #> On Unix systems, you can setup the following line to your crontab using "crontab -e": #> 0 * * * * Rscript -e 'rchallenge::publish("/tmp/Rtmp7NoKFA/challenge.rmd")'
setwd(wd) unlink(path)