-
-
Save hlapp/41312b3cc788abcea263 to your computer and use it in GitHub Desktop.
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 <- " | |
-------------------- | |
# {{{YourName}}} | |
* Institution: {{{Affiliation}}} | |
* Email: {{{EmailAddress}}} | |
* Applied on: {{{Timestamp}}} | |
## What skills and knowledge do you bring to the event? | |
{{{Whatskillsandknowledgedoyoubringtotheevent}}} | |
## What motivates you to participate in the event? | |
{{{Whatmotivatesyoutoparticipateintheevent}}} | |
## What do you hope to get out of the event? | |
{{{Whatdoyouhopetogetoutoftheevent}}} | |
## Other comments | |
{{{OtherComments}}} | |
## Demographic information | |
* Gender: {{{Gender}}} | |
* Ethnicity: {{{Ethnicity}}} | |
* Ethnic Origin/Race: {{{RaceEthnicorigin}}} | |
## Funding and attendance | |
* {{{Doyouhavefundstosupportyourparticipation}}} | |
* I will be traveling from {{{Wherewillyoulikelybetravelingfrom}}}. | |
* {{{Availability}}} | |
" | |
text <- lapply(responses_lst, function(x) whisker.render(template, x)) | |
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