Open mine-cetinkaya-rundel opened 8 months ago
To further elaborate on the problems, the advice on how to use spec()
is also pretty underwhelming. Because you can't just call spec()
, you need to call it on the results of read_csv()
, so we aren't giving a particularly useful hint and there's no obvious way to fix that.
> spec()
Error in spec() : argument "x" is missing, with no default
Run `rlang::last_trace()` to see where the error occurred.
> spec(mtcars)
cols(
mpg = col_double(),
cyl = col_double(),
disp = col_double(),
hp = col_double(),
drat = col_double(),
wt = col_double(),
qsec = col_double(),
vs = col_double(),
am = col_double(),
gear = col_double(),
carb = col_double()
)
The following is the current result of reading a CSV file:
Created on 2024-01-29 with reprex v2.0.2
I think the message can be entirely removed.
i
nfo items can be confusing for new learners who will either learn to ignore messages (which is what experienced folks do most of the time when they see this message) or get confused about whether they must act on the suggestions or they can act on them.read_csv()
,read_tsv()
, etc.We discussed the possibility of a package or tidyverse level strict option where the user would have to specify column types (which is preferable for production settings), but for most interactive usage the messaging is either unnecessary or confusing (particularly to new learners).
At a minimum, I'd suggest removing the
i
nfo items.