Unexpected values
- Most common way column detection fails is a column contains unexpected values so you get a character column.
- The most common cause is a missing value, recorded using something other than
NA
.
simple_csv <- "
x
10
.
20
30"
read_csv(simple_csv)
## Rows: 4 Columns: 1
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): x
##
## ℹ 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: 4 × 1
## x
## <chr>
## 1 10
## 2 .
## 3 20
## 4 30