publish(input = "challenge.rmd", output_file = NULL, output_dir = file.path("~/Dropbox/Public"), quiet = FALSE, ...)
NULL
then a default based on the name
of the input file is chosen."~/Dropbox/Public"
so that the rendered page can easily be shared on the web with Dropbox.render
.Publish your challenge R Markdown script to a html page.
path <- tempdir() wd <- setwd(path) new_challenge()New challenge installed in: "/tmp/Rtmp5vusFY" 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. Publish the html page in your "Dropbox/Public" folder: rchallenge::publish("./challenge.rmd") 6. Give the Dropbox public link to "Dropbox/Public/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/Rtmp5vusFY/challenge.rmd")'outdir = tempdir() publish(output_dir = outdir, output_options = list(self_contained = FALSE))processing file: challenge.rmd| | | 0% | |.. | 3% ordinary text without R code | |.... | 6% label: unnamed-chunk-1 (with options) List of 3 $ echo : logi FALSE $ message: logi FALSE $ warning: logi FALSE | |...... | 9% inline R code fragments | |....... | 11% label: unnamed-chunk-2 (with options) List of 1 $ eval: logi FALSE | |......... | 14% ordinary text without R code | |........... | 17% label: unnamed-chunk-3 | |............. | 20% inline R code fragments | |............... | 23% label: unnamed-chunk-4 | |................. | 26% ordinary text without R code | |................... | 29% label: unnamed-chunk-5 (with options) List of 1 $ eval: logi FALSE | |.................... | 31% ordinary text without R code | |...................... | 34% label: unnamed-chunk-6 | |........................ | 37% ordinary text without R code | |.......................... | 40% label: unnamed-chunk-7 | |............................ | 43% ordinary text without R code | |.............................. | 46% label: unnamed-chunk-8 (with options) List of 3 $ echo : logi FALSE $ collapse: logi TRUE $ comment : logi NA | |................................ | 49% ordinary text without R code | |................................. | 51% label: unnamed-chunk-9 (with options) List of 3 $ echo : logi FALSE $ collapse: logi TRUE $ comment : logi NA | |................................... | 54% ordinary text without R code | |..................................... | 57% label: unnamed-chunk-10 (with options) List of 1 $ eval: logi FALSE | |....................................... | 60% inline R code fragments | |......................................... | 63% label: unnamed-chunk-11 (with options) List of 3 $ echo : logi FALSE $ collapse: logi TRUE $ comment : logi NA | |........................................... | 66% inline R code fragments | |............................................. | 69% label: unnamed-chunk-12 (with options) List of 2 $ echo : logi FALSE $ results: chr "asis" | |.............................................. | 71% inline R code fragments | |................................................ | 74% label: unnamed-chunk-13 (with options) List of 2 $ echo : logi FALSE $ results: chr "asis" | |.................................................. | 77% inline R code fragments | |.................................................... | 80% label: unnamed-chunk-14 (with options) List of 4 $ echo : logi FALSE $ fig.cap : chr "Submissions history - Error rate" $ fig.height: num 5 $ fig.width : num 9| |...................................................... | 83% inline R code fragments | |........................................................ | 86% label: unnamed-chunk-15 (with options) List of 4 $ echo : logi FALSE $ fig.cap : chr "Submissions history - Average cost" $ fig.height: num 5 $ fig.width : num 9| |.......................................................... | 89% inline R code fragments | |........................................................... | 91% label: unnamed-chunk-16 (with options) List of 4 $ echo : logi FALSE $ fig.cap : chr "Submissions history - Activity" $ fig.height: num 5 $ fig.width : num 9| |............................................................. | 94% inline R code fragments | |............................................................... | 97% label: unnamed-chunk-17 (with options) List of 1 $ echo: logi FALSE | |.................................................................| 100% ordinary text without R codeoutput file: challenge.knit.md/usr/lib/rstudio/bin/pandoc/pandoc challenge.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output /tmp/Rtmp5vusFY/challenge.html --smart --email-obfuscation none --standalone --section-divs --table-of-contents --toc-depth 3 --template /home/adrien-alea/R/x86_64-pc-linux-gnu-library/3.2/rmarkdown/rmd/h/default.html --variable 'theme:spacelab' --include-in-header /tmp/Rtmp5vusFY/rmarkdown-str327874129015.html --mathjax --variable 'mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --highlight-style tangoOutput created: /tmp/Rtmp5vusFY/challenge.htmlNext step: give the Dropbox public link to "/tmp/Rtmp5vusFY/challenge.html" to the participants.unlink(outdir) setwd(wd) unlink(path)
render