Skip to contents

Returns the column names of a string in a delimiter-separated-value format like CSV or TSV.

Usage

dsv_colnames(x, delim = ",", quote = "\"")

Arguments

x

Delimiter-separated string. A character scalar.

delim

Single character used to separate fields within x.

quote

Single character used to quote strings within x. Set to NULL for none.

Value

A character vector of column names.

See also

Examples

# \donttest{
httr::GET("https://raw.githubusercontent.com/tidyverse/readr/master/inst/extdata/mtcars.csv") |>
  httr::content(as = "text") |>
  pal::dsv_colnames()# }
#>  [1] "mpg"  "cyl"  "disp" "hp"   "drat" "wt"   "qsec" "vs"   "am"   "gear" "carb"