# NOT RUN {
# Input sources -------------------------------------------------------------
# Read from a path
melt_csv(readr_example("mtcars.csv"))
melt_csv(readr_example("mtcars.csv.zip"))
melt_csv(readr_example("mtcars.csv.bz2"))
# }
# NOT RUN {
melt_csv("https://github.com/tidyverse/readr/raw/master/inst/extdata/mtcars.csv")
# }
# NOT RUN {
# Or directly from a string (must contain a newline)
melt_csv("x,y\n1,2\n3,4")
# To import empty cells as 'empty' rather than `NA`
melt_csv("x,y\n,NA,\"\",''", na = "NA")
# File types ----------------------------------------------------------------
melt_csv("a,b\n1.0,2.0")
melt_csv2("a;b\n1,0;2,0")
melt_tsv("a\tb\n1.0\t2.0")
melt_delim("a|b\n1.0|2.0", delim = "|")
# }
Run the code above in your browser using DataLab