cms_errors_fixes <- function(x) {
z <- x %>%
#convert the id and mobile JSON values to lower case
mutate_at(6:7,funs(str_to_lower)) %>%
#classify the errors by type
mutate(error_type = ifelse(str_detect(id,'mob_er_')==TRUE,'mob_er_error',
ifelse(str_detect(id,'hc')==TRUE,'hc_error',
ifelse(str_detect(id,'tan.message')==TRUE,'tan_message_error',
ifelse(str_detect(id,'tan_mob')==TRUE,'tan_mob_error',
ifelse(str_detect(id,'tan')==TRUE & str_detect(id,'tan.message')==FALSE & str_detect(id,'mob')==FALSE,'tan_error',
ifelse(str_detect(id,'zv')==TRUE,'zv_error',
ifelse(str_detect(id,'prelg')==TRUE,'prelg_error',
ifelse(str_detect(id,'er_pp')==TRUE,'photopay_error',
ifelse(str_detect(id,'_da_')==TRUE,'da_error',
ifelse(str_detect(id,'er')==TRUE & str_detect(id,'mob_er')==FALSE & str_detect(id,'error')==FALSE & str_detect(id,'finger')==FALSE,'er_error',
'other_error'))))))))))
) %>%
#convert the mobile json values from DE to EN
mutate(mobile_json = gsub('finanzuebersicht','financeoverview',mobile_json),
mobile_json = gsub('umsatzuebersicht','transactionoverview',mobile_json),
mobile_json = gsub('dauerauftragneu','standingordercreate',mobile_json),
mobile_json = gsub('dauerauftraguebersicht','standingorderoverview',mobile_json),
mobile_json = gsub('ueberweisung','payments',mobile_json),
mobile_json = gsub('geldautomat','branchfindersearch',mobile_json),
mobile_json = gsub('branchfinderschwarz','branchfinder',mobile_json),
mobile_json = gsub('geldanfordern','branchfinder',mobile_json),
mobile_json = gsub('allgemein','general',mobile_json)
) %>%
#fix the id for the er_errors
mutate(error_code = ifelse(error_type == 'er_error',paste(mobile_json,id,sep='.'),str_to_lower(id)),
error_code = ifelse(error_type == 'er_error',gsub('ob.','',error_code,fixed=TRUE),error_code)) %>%
#fix the error code for hc
mutate(error_code = ifelse(error_code == 'hc1',paste(mobile_json,id,sep='.'),error_code))
return(z)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.