Last active
November 14, 2017 08:36
-
-
Save verajosemanuel/3050e2df5fdc3d0a930102eaa750ffff to your computer and use it in GitHub Desktop.
get a numerical ID from Data Frame in order to insert into Database as autoincrement #R #tibble #wrangling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(tibble) | |
# if nrow is numerical | |
df <- rownames_to_column(df, var = "id") | |
# if nrow is not numerical | |
df$id <- seq.int(nrow(df)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment