Skip to content

col_types = 'text_as_shown' ? #737

@moodymudskipper

Description

@moodymudskipper

This is related to #462 (closed)

I understand why it was closed but I'd like to make the case for a 'text_as_shown' option for column types.

In many cases what is shown in excel is not the truth, so we're better off taking the actual value rather than what is shown.

In my case I have on one hand a lookup table in R that I don't create, which contains a column with "66.67%" stored as text (this column can also store actual text), and a value to look up, and on the other hand an excel file with this "66.67%" value typed by the user, expecting it to work with the lookup.

This will be read by read_excel() as "0.6....67" if I read it as text, and in order to to the lookup I have to do some awkward data wrangling.

Granted, I realise the design is not great, but I'm not responsible for it and this will be easily simplified if I could specify "text_as_shown" as a value to col_types, it would also be explicit enough so that I don't believe users would import wrong data by mistake more than they would without this option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions