Skip to content

Commit

Permalink
Better explanation in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Oct 10, 2024
1 parent 70ad465 commit 23adf66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/players_manual_overwrite.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ players_manual_ids_clean <- function(manual_ids = players_manual_ids_fetch()){

overwrite <- function(original_vec, replacement_vec){
# IF THE REPLACEMENT VALUE IS
# NAN -> WE WANT TO SET THE REPLACEMENT TO NA
# NA -> WE WANT TO KEEP THE ORIGINAL VALUE
# "" -> WE WANT TO SET THE REPLACEMENT TO NA, I.E. REMOVE THE ORIGINAL VALUE!
# NA -> WE WANT TO KEEP THE ORIGINAL VALUE
# OTEHRWISE WE USE THE REPLACEMENT VALUE
replacement <- unname(replacement_vec[names(original_vec)])

Expand Down

0 comments on commit 23adf66

Please sign in to comment.