Skip to main content
  1. Posts/

Use reprex without browsers

·36 words·1 min·
Tim Liu
Author
Tim Liu
Personalizing medicine · MB BChir & Information/Bioengineering BA (Cambridge) · genetics & genomics, machine learning, digital healthcare

The following code will generate a randomly named *_reprex.md file that can be copied for others.

reprex::reprex(
  {
library(tibble)
library(purrr)
library(dplyr)
mutate(tibble(a=1),b = map(a, ~ tibble(c=1)))
  }
  , outfile = "reprex.html", html_preview=FALSE, session_info = TRUE
)