knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) set.seed(1) library(magrittr) poorly_ordered <- expand.grid(98:103, 9:11) %>% apply(1, function(x) paste0("patient", x, "-day", x, ".png")) %>% sample(size = length(.))
poorly_ordered is a vector of file names of images of patient samples from different days.
How do we get this vector into order? Well, alphabetical order doesn't work:
Patient 100 comes before patient 99. This is because 1 comes before 9 in alphabetical order.
It's possible to alphord the numbers by prefixing them with zeroes:
Having done this, the alphabetical order is the one we want:
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.