On 2020-07-20 17:54 -0400, H wrote: > On 07/18/2020 11:42 PM, Rasmus Liland wrote: > > > > The thing is, defining the second column > > as of type Date in colClasses happens to > > work, but it's still character when you > > check with str(dat) ... perhaps it has > > something to do with this info from [4]: > > > > as_tibble_row() converts a vector to > > a tibble with one row. The input > > must be a bare vector, e.g. vectors > > of dates are not supported yet. If > > the input is a list, all elements > > must have length one. > > > > [4] https://tibble.tidyverse.org/reference/as_tibble.html > > Thank you for your extensive example. > However, I have decided to simply > convert column types as necessary and > rename columns as desired after > importing the data since that seems > the simplest solution.
Dear H, Right, I am glad you figured this out. Please just elaborate (if you want to/are able) what solution/idea you were after so I, others, learn something for another time. I imagined you were sitting on tonnes of csv files and were going to handle dates on some very specific, rarely-occurring rows in there ... Best, Rasmus
signature.asc
Description: PGP signature
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.