col_names = FALSE

  • Use col_names = FALSE to not treat the first row as headings and instead label them sequentially from X1 to Xn:
read_csv(
  "1,2,3
  4,5,6",
  col_names = FALSE
)
## Rows: 2 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (3): X1, X2, X3
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
## # A tibble: 2 × 3
##      X1    X2    X3
##   <dbl> <dbl> <dbl>
## 1     1     2     3
## 2     4     5     6