Open Sibojang9 opened 1 year ago
The listand cols arguments in read_csvseem to be interchangeable, and I cannot find a clear answer online. Any insight into this?
list
cols
read_csv
library(tidyverse) read_csv( "a,b,c 4,5,6" ,col_types = list(a = col_factor())) #> # A tibble: 1 × 3 #> a b c #> <fct> <dbl> <dbl> #> 1 4 5 6 read_csv( "a,b,c 4,5,6" , col_types = cols(a = col_factor())) #> # A tibble: 1 × 3 #> a b c #> <fct> <dbl> <dbl> #> 1 4 5 6
Created on 2023-09-06 with reprex v2.0.2
Documentation for cols says they're generally interchangable.
The
list
andcols
arguments inread_csv
seem to be interchangeable, and I cannot find a clear answer online. Any insight into this?Created on 2023-09-06 with reprex v2.0.2