russell_biolincc_cleaning_note

Introduction

In this note, I will mention all error appear on Russell_biolincc_cleaning_02 and relevant R doc. You can search all error by the error number that I will list below

Summary of Errors:

error 1:

This wasn’t happened before, please double check the Russell_create_htnmed.R (CARDIA study wasn’t have the no_med indicator, I use both bp_med for med_indicator_var and orginal_htn_vari)

Warning message: There was 1 warning in `mutate()`. ℹ In argument: `htnmed_merged = case_when(...)`. Caused by warning in `bp_med == htnmed_no`: ! 长的对象长度不是短的对象长度的整倍数 

error 2:

Can’t create the baseline indicator for ARIC

error 3:

this error is refer to how cvd event cleaning process, the whole process need a double check. If you have any idea, please optimizing the Russell_create_cvd_function.R. Use other logic might make this process better. I think the best solution will be use other logic in Russell_create_cvd_function, and try to stop use Russell_merge_vars_function.R

error 4:

Error 4 is refer to “merge_and_drop_vars”, this function doesn’t work well when I add CARDIA data into it. this is the error description.

Error in `mutate()`: ℹ In argument: `merged_variable = case_when(...)`. Caused by error in `case_when()`: ! Can't combine `..1 (right)` <double> and `..5 (right)` <character>. Run `rlang::last_trace()` to see where the error occurred.

error 5:

this error is refer to the variable select process at the end fo cleaning doc. this function doesn’t work perciesedly in my laptop, might be fine in different environment. There is no error description in this error. But it just can’t correctly select what we want.

error 6:

This error is refer to the summary function at the end. When you solve error 5