Follow-up to #3690 and #4464.
Originally I said it would take significant effort but #4464 would make adding a parser for complex straightforward -- parse_double_regular_core followed by + or -, then parse_double_regular_core followed by i. The only complication is about storage -- fread.c returns a struct and freadR.c applies Rcomplex?
It also raises a question of efficiency -- how much of an impact does it have to add auto-detect types? Since plain numeric and complex columns look identical for 10-15 characters (maybe), it could be inefficient to offer this "lookalike" parser. OTOH it's only applied to a small sample of rows.
Follow-up to #3690 and #4464.
Originally I said it would take significant effort but #4464 would make adding a parser for complex straightforward --
parse_double_regular_corefollowed by+or-, thenparse_double_regular_corefollowed byi. The only complication is about storage --fread.creturns astructandfreadR.cappliesRcomplex?It also raises a question of efficiency -- how much of an impact does it have to add auto-detect types? Since plain
numericandcomplexcolumns look identical for 10-15 characters (maybe), it could be inefficient to offer this "lookalike" parser. OTOH it's only applied to a small sample of rows.