--- title: "Analyzing my logbook data" author: "Anders MÃ¥rell" date: "2023-06-09" output: html_document editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Tags used per day Read in the journal file *Readme.md* that is in the *journal* folder. Then extract the lines with date headings at the second level. We can then extract the tags and the dates: ```{r} # Import data ------------------------------------------------------------------ MyData <- readLines(con = here::here("journal", "Readme.md")) # Extract lines with headings at the 2nd level --------------------------------- MyDates <- MyData[grepl(pattern = "##", x = MyData)] # Extract the tags ------------------------------------------------------------- MyTags <- sub(pattern = "-->", replacement = "", x = sub(pattern = ".*