Skip to contents

Split a file into yaml and body

Usage

process_yaml(file)

Arguments

file

Filename (string)

Examples

process_yaml(system.file("extdata/example.rmd", package="breheny"))
#> $yaml
#> $yaml$author
#> [1] "Patrick Breheny"
#> 
#> $yaml$`slide-level`
#> [1] 3
#> 
#> $yaml$date
#> [1] "July 6, 2022"
#> 
#> $yaml$affiliation
#> [1] "University of Iowa"
#> 
#> $yaml$institute
#> [1] "Associate Professor\\\nDepartment of Biostatistics\n"
#> 
#> $yaml$title
#> [1] "Statistical genetics and genome-wide studies"
#> 
#> 
#> $body
#> [1] "### Overview"                                                                                                                                                  
#> [2] ""                                                                                                                                                              
#> [3] "- Today's lecture is about the statistical aspects of genetics and how we can link traits (e.g., height, blood pressure, disease) to specific genetic variants"
#> [4] "- We'll go into some depth concerning the most commonly used mathematical / statistical models for genetics, and briefly touch on more complex extensions"     
#> [5] "- In addition, we'll discuss how this works at the genome-wide scale and what has been learned from the collective efforts to do so ---"                       
#> [6] ""                                                                                                                                                              
#> [7] "### DNA vs. expression"                                                                                                                                        
#> [8] ""                                                                                                                                                              
#> [9] "- The basic flow of information within a cell is as follows:"                                                                                                  
#>