Low-tech common sense about filenames. The holy trinity is:
Lightning talk for https://normconf.com 2022-12-15 by Jenny Bryan Twitter: @jennyBryan Mastodon: @jennybryan GitHub: @jennybc
pos.it/how-to-name-files is a shortlink to HERE
Slides on SpeakerDeck
Slides as PDF file here in this repo
These lightning talks were pre-recorded. Video is available here:
A lower-res, downloadable version is here in the repo: how-to-name-files-480.mov
This work is licensed under a Creative Commons Attribution 4.0 International License.
Material originated during a Reproducible Science Curriculum Workshop, held at NESCent in December 2014, under the auspices of the Reproducible Science Curriculum https://github.com/Reproducible-Science-Curriculum.
The original slides were made for a workshop held at Duke University in May 2015 and were shared at https://speakerdeck.com/jennybc/how-to-name-files.
The Jason Bourne (2016) movie really does have some fantastic file names right around the 6 minute mark. Seriously!
A more complete snippet for the tidyverse-y R code I show for converting a list of filenames into a data frame looks more like this
library(tidyverse)
# note: as of 2022-12-04, separate_wider_delim() is only available in a dev
# version of tidyr, which I have installed locally
filenames <- list.files(pattern = "Plasmid")
tibble(filenames) |>
separate_wider_delim(
filenames,
delim = regex("[_\\.]"),
names = c("date", "assay", "line", "well", NA)
)
Good discussion of slugs here in the wikipedia page for clean URLs
Tweet with the "comprehensive map of all countries in the world that use MM-DD-YYY" https://twitter.com/donohoe/status/597876118688026624
The ISO 8601 standard for datetimes
Image credits