Join Nostr
2025-06-16 07:58:20 UTC
in reply to

Lyndal on Nostr: Took many iterations but eventually hacked a solution: 1) import all columns as text, ...

Took many iterations but eventually hacked a solution:

1) import all columns as text, no guesses on format
—(this was okay as I already have set up a function to apply formatting, factors, etc based on column name further down the pipeline)

2) do an if/else string-detect for an entry containing punctuation in the date column; if FALSE (ie it’s an Excel date pretending to be an integer, not a recognisable date or null field) then use the excel library’s convertToDate but then save that date as a string

3) convert the whole column to a date (R-recognised dates and null/NA values included)