Chapter 41 Rename Fields

The field names are not user friendly. Let us rename the fields to user friendly names.

AdverseFoodEvents = AdverseFoodEvents %>%
  rename(ReportNo = `RA_Report #`) %>%
  rename(CreatedDate = `RA_CAERS Created Date`) %>%
  rename(StartDate = `AEC_Event Start Date`) %>%
  rename(ProductRole = `PRI_Product Role`) %>%
  rename(ProductName = `PRI_Reported Brand/Product Name`) %>%
  rename(IndustryName = `PRI_FDA Industry Name`) %>%
  rename(AgeUnit = `CI_Age Unit`) %>%
  rename(AgeAtAdverseEvent = `CI_Age at Adverse Event`) %>%
  rename(Gender = `CI_Gender`) %>%
  rename(Outcomes = `AEC_One Row Outcomes`) %>%
  rename(Symptoms = `SYM_One Row Coded Symptoms`)

colnames(AdverseFoodEvents)
##  [1] "ReportNo"              "CreatedDate"          
##  [3] "StartDate"             "ProductRole"          
##  [5] "ProductName"           "PRI_FDA Industry Code"
##  [7] "IndustryName"          "AgeAtAdverseEvent"    
##  [9] "AgeUnit"               "Gender"               
## [11] "Outcomes"              "Symptoms"