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

Add "unique_colnames" keyword option to load() #45

Open
alyst opened this issue Aug 10, 2018 · 5 comments
Open

Add "unique_colnames" keyword option to load() #45

alyst opened this issue Aug 10, 2018 · 5 comments

Comments

@alyst
Copy link
Collaborator

alyst commented Aug 10, 2018

As mentioned in #44 , it would be nice to add unique_colnames=true option to load(), which would propagate to DataFrame({r data frame}, makeunique=unique_colnames).
That will make the default behaviour reasonable, while still allowing the user to control it.

@nalimilan
Copy link
Member

Why not call that argument makeunique for consistency?

@alyst
Copy link
Collaborator Author

alyst commented Aug 17, 2018

Why not call that argument makeunique for consistency?

load() can return different objects. I'm not sure it is as clear as in DataFrame ctor that makeunique refers to the columns of data frames (or matrices). What if the user expects a vector of strings, then makeunique (which defaults to true) would be really confusing.

@nalimilan
Copy link
Member

Yeah, maybe. However, it's not very explicit either for the DataFrame constructor (where it could also mean e.g. that rows should all be unique).

@alyst
Copy link
Collaborator Author

alyst commented Aug 20, 2018

I would be very much in favor of using the same corrected keyword as DataFrame ctor. Maybe something like uniquenames? Or fixnames, meaning that it will both make the name unique and a correct Julia identifier. In case of load("*.rda") it can potentially apply to DataFrame column names, matrix row/column names, list/vector element names, top level identifier names (variables).

@nalimilan
Copy link
Member

Makes sense. We need a quite strong motivation to change the name in DataFrames though, given the burden it imposes on users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants