Skip to content

Commit

Permalink
chg na type for false r2n
Browse files Browse the repository at this point in the history
  • Loading branch information
p-will-b committed Aug 14, 2021
1 parent ff41ae8 commit fc6dd1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/rating_to_numeric.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rating_to_numeric <- function(credit_rating, na_as_nr = TRUE) {

if(!na_as_nr) {
rtg_out <- creditor:::cr_imp$numeric_value[match(x, creditor:::cr_imp$char_value)]
rtg_out[is.na(credit_rating)] <- NA_character_
rtg_out[is.na(credit_rating)] <- NA_real_
return(rtg_out)

} else {
Expand All @@ -40,3 +40,5 @@ rating_to_numeric <- function(credit_rating, na_as_nr = TRUE) {
}

}


0 comments on commit fc6dd1b

Please sign in to comment.