Skip to content

Instantly share code, notes, and snippets.

@kaz-yos
Created November 14, 2017 02:53
Show Gist options
  • Save kaz-yos/4cc4befff925e20f0dfeadd835694942 to your computer and use it in GitHub Desktop.
Save kaz-yos/4cc4befff925e20f0dfeadd835694942 to your computer and use it in GitHub Desktop.
tsv to json in R (org-mode)
#+BEGIN_SRC R :session *R* :results output :exports both
suppressPackageStartupMessages(library(tidyverse))
data1 <- read_tsv("./data.tsv")
print(data1,
width = Inf)
library(jsonlite)
jsonlite::toJSON(data1, pretty = TRUE)
#+END_SRC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment