Skip to content

Commit

Permalink
Update 07-standardize-titles.R
Browse files Browse the repository at this point in the history
  • Loading branch information
lecy committed Jul 11, 2023
1 parent 01687bd commit b3711b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/07-standardize-titles.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ standardize_titles <- function(comp.data, title = "TitleTxt6",
sheet="title-standardization", range="A:D",
col_types = "c" ) # c = character
df.standard[ is.na( df.standard ) ] <- ""

dupes <- df.standard$title.variant[ duplicated( df.standard$title.variant ) ] %>% sort()
if( length(dupes) > 0 )
{
print( "There are duplicate title variants: ")
print( paste0( dupes, collapse=" ;; " ) )
}

df.standard <- unique( df.standard )
df.standard <- filter( df.standard, ! duplicated( title.variant ) )


comp.data <- basic_csuite_fixes( comp.data, officer = officer )
Expand Down

0 comments on commit b3711b3

Please sign in to comment.