[R] tidyverse: read_csv() misses column

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Mon Nov 1 17:40:23 CET 2021

The data file, cor-disc.csv begins with:

The first 7 columns are character strings; the 8th column is an integer.

After loading library(tidyverse) I ran read_csv() with this result:
> cor_disc <- read_csv("../data/cor-disc.csv")
415263 Columns: 8
── Column specification 
Delimiter: ","
chr (5): mon, day, hr, min, tz
dbl (2): site_nbr, year

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this 

1. What happed to the values in column 'disc?'

2. Why are site_nbr and year seen as doubles when they're character strings?

I've not found answers in the book or in ?read_csv.

What am I missing?


More information about the R-help mailing list