You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is the current result of reading a CSV file:
library(readr)
mtcars<- read_csv(readr_example("mtcars.csv"))
#> Rows: 32 Columns: 11#> ── Column specification ────────────────────────────────────────────────────────#> Delimiter: ","#> dbl (11): mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb#> #> ℹ 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.
The info 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.
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 info items.
The text was updated successfully, but these errors were encountered:
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()
et al. report delimiter #1469, the reporting of the delimiter is redundant for functions likeread_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.The text was updated successfully, but these errors were encountered: