Last active
August 29, 2015 14:07
-
-
Save fmichonneau/f768c987414e2107f7be to your computer and use it in GitHub Desktop.
RSC applicants template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(whisker) | |
library(knitr) | |
responses <- read.csv(file="applicants.csv", stringsAsFactors=FALSE) | |
names(responses)[ncol(responses)] <- "attendance" | |
responses_lst <- apply(responses, 1, function(x) as.list(x)) | |
template <- " | |
-------------------- | |
# {{Name}} | |
* Title: {{Title}} | |
* Institution: {{Institutional.affiliation}} | |
* Email: {{email.address}} | |
* Applied on: {{Timestamp}} | |
## Experience: | |
{{Describe.your.experience.with.reproducible.science}} | |
## What motivates you? | |
{{What.motivates.you.to.attend.this.workshop.}} | |
## What do you expect to contribute? | |
{{What.do.you.expect.to.contribute.to.the.event.}} | |
## Interests and relevant work | |
{{Interests.and.relevant.work}} | |
## Demographic information | |
* Gender: {{Gender}} | |
* Ethnicity: {{Ethnicity}} | |
* Race: {{Race}} | |
* Citizenship: {{Citizenship}} | |
## Funding and attendance | |
* {{Funding}} | |
* {{attendance}} | |
" | |
text <- lapply(responses_lst, function(x) whisker.render(template, x, strict=FALSE)) | |
cat(unlist(text), sep="\n", file="applications.Rmd") | |
knit2html("applications.Rmd") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment