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

de-conflict duplicate column names #50

Closed
dcooley opened this issue Feb 5, 2020 · 0 comments
Closed

de-conflict duplicate column names #50

dcooley opened this issue Feb 5, 2020 · 0 comments

Comments

@dcooley
Copy link
Owner

@dcooley dcooley commented Feb 5, 2020

library(sfheaders)

df <- data.frame(
  x1 = 1:5
  , y = 1:5
  , x = 1:5
)

sf <- sfheaders::sf_point(df, x = "x1", y = "y", keep = T)

sfheaders::sf_to_df(sf, fill = T)
#   x sfg_id point_id x y
# 1 1      1        1 1 1
# 2 2      2        2 2 2
# 3 3      3        3 3 3
# 4 4      4        4 4 4
# 5 5      5        5 5 5

TODO

Decide betwen

  • replacing data column x with x..1
  • replacing sfg column x with x..1
  • have an attribute (sfc_columns) on the data.frame giving the x, y, z, m column names
@dcooley dcooley closed this in 9e3e600 Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.