dsv_colnames: Get column names of a delimiter-separated string

dsv_colnamesR Documentation

Get column names of a delimiter-separated string

Description

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

Other string functions: as_chr(), as_comment_str(), as_line_feed_chr(), as_str(), capitalize_first(), enum_str(), escape_lf(), fuse_regex(), prettify_nr(), sentenceify(), wrap_chr()

Examples

"https://raw.githubusercontent.com/tidyverse/readr/master/inst/extdata/mtcars.csv" |>
  httr2::request() |>
  httr2::req_perform() |>
  httr2::resp_body_string() |>
  pal::dsv_colnames()

salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.