Hi,
I need to read several different data inputs with read_csv(). I have somewhere saved the column types, which I want to use to check errors. My question is: how do I turn a string with columns types into a cols() object.
For example, this works:
cols('c', 'n')
But I need something like this:
aa <- c('c','n')
cols(aa)
This second call gives me an error:
> aa <- c('c','n')
> cols(aa)
Error in switch(x,_
= ,-
= col_skip(),?
= col_guess(), c = col_character(), : EXPR must be a length 1 vector