I have a dataframe much like this one
ID Col2 Col3 Col4 Col5
ID_1 JDH 43 FJS f8j
ID_8 ABC 73 *NA* *NA*
ID_7 AFE 03 *NA* k32
ID_8 *NA* *NA* FDS z7d
where I have some rows with the same name/ID (ID_8 in this example) that have different values in the following columns. I now want to merge these rows into a new row ID_8_New without NAs. The dataframe should look something like this:
ID Col2 Col3 Col4 Col5
ID_1 JDH 43 FJS f8j
ID_8 ABC 73 *NA* *NA*
ID_7 AFE 03 *NA* k32
ID_8 *NA* *NA* FDS z7d
ID_8_New ABC 73 FDS z7d
Does anyone have any tips for me how I can accomplish this? My real dataframe has multiple of those rows. Thank you!
EDIT: Here is the dput
structure of a subset of my data
structure(list(Company = c("CompanyA", "CompanyA"), Ticker = c("A",
"A"), Ticker_Unq = c("A1",
"A2"), Description = c(NA,
"Text"
), Type = c("Token", NA)), row.names = c(NA, -2L), class = c("tbl_df",
"tbl", "data.frame"))