Hi,
PROBLEM:
I have a data file with columns that can be ignored, hence the use case for "cols_only"
However these column names have spaces and my code, as follows:
df.temp = read_file(c.csv.temp.file) %>%
str_replace_all('"{2,3}', '"') %>%
read_csv(col_names = TRUE,
col_types = cols_only(tripduration = col_integer(),
starttime = col_datetime("%d/%m/%Y %H:%M"),
start station id = col_integer()))
returns:
Error: unexpected symbol in:
" starttime = col_datetime("%d/%m/%Y %H:%M"),
start station"
A sample input csv.file is attached.
Thanks for the help
Br /