Tristan Mahr
February 25, 2016
# function to display text inline
md_mono <- function(x) sprintf("`%s`", x)
# log todos to a yaml file
todos <- list(date = format(Sys.Date()))
todo <- function(note, note_fun = md_mono, outfile = "todos.yaml") {
note <- stringr::str_replace_all(note, "\\n", " ")
todos <<- c(todos, note)
writeLines(yaml::as.yaml(todos), outfile)
note_fun(note)
}Thirty children participated in the study. N children with hearing loss had to be excluded, and N parent reported late talkers had
to be excluded.
str(todos)## List of 3
## $ date: chr "2016-02-25"
## $ : chr "N children with hearing loss"
## $ : chr "N parent reported late talkers"
cat(yaml::as.yaml(todos))## date: '2016-02-25'
## '': N children with hearing loss
## '': N parent reported late talkers