Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: return the 'final' parse patterns used for read in data (along with already returned col types) #728

Closed
statsccpr opened this issue Oct 27, 2017 · 1 comment
Labels
feature a feature request or enhancement
Milestone

Comments

@statsccpr
Copy link

statsccpr commented Oct 27, 2017

There is already the function spec_csv() which returns the column types.

But can there also be a function that returns the set of patterns used for delimiters, comments, nas, Nulls? "meta data" that would appease the wish list in the rant here
http://www.johnmyleswhite.com/notebook/2016/09/23/no-juice-for-you-csv-format-it-just-makes-you-more-awful/

say a list containing
quote = """, escape_backslash = FALSE,
escape_double = TRUE, col_names = TRUE, col_types = NULL,
locale = default_locale(), na = c("", "NA"), quoted_na = TRUE,
comment = ""

The above 'meta data' can be taken from the default argument values say args(spec_csv)

Basically, i'm proposing read_csv(file,verbose=TRUE)
where verbose=TRUE, would output the meta data patterns along with the already output column types fromspec_csv()

I guess you could instead push this into spec_csv(,return_pattern=TRUE)

I've kind of pushed the data.table::fread guys on this too, since there seems to be others with this feature wish

Rdatatable/data.table#2437

@jimhester jimhester added the feature a feature request or enhancement label Dec 7, 2017
@jimhester jimhester added this to the backlog milestone Nov 19, 2018
@jimhester
Copy link
Collaborator

Fixed by #1172, which includes more of this metadata in the spec output, though there is still some that is not there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants