hugheylab / phers

https://phers.hugheylab.org
0 stars 0 forks source link

lintr found issues with code #56

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago
  1. R/genetic_association.R line 44: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L44)
    diseaseId = disease_id = snp = allele_count = count = N = vid = NULL   
  2. R/genetic_association.R line 127: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L127)
    ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het = n_hom =   
  3. R/genetic_association.R line 128: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L128)
    n_total = n_wt = NULL   
  4. R/genetic_association.R line 139: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L139)
    lmInput1[allele_count == 2, allele_count := 1]}   
  5. R/genetic_association.R line 142: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L142)
    lmInput1[allele_count == 1, allele_count := 0]   
  6. R/genetic_association.R line 143: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L143)
    lmInput1[allele_count == 2, allele_count := 1]}   
  7. R/genetic_association.R line 146: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L146)
    lmInput1[, allele_count := as.factor(allele_count)]   
  8. R/genetic_association.R line 162: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L162)
    glmStat[, ci_lower := ci[varName, 1]]   
  9. R/genetic_association.R line 163: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L163)
    glmStat[, ci_upper := ci[varName, 2]]}   
  10. R/phers.R line 32: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L32)
    flag = icd = person_id = . = NULL   
  11. R/phers.R line 83: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L83)
    phecode = person_id = . = prev = w = NULL   
  12. R/phers.R line 116: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L116)
    person_id = phecode = disease_id = w = score = . = NULL   
  13. R/phers.R line 157: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L157)
    disease_id = diseaseId = resid_score = . = person_id = score = NULL   
  14. R/positive_control.R line 26: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L26)
    dx_status = entry_date = uniq_dates = . = NULL   
  15. R/positive_control.R line 46: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L46)
    cases[, dx_status := 1]   
  16. R/positive_control.R line 55: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L55)
    dxStatus[is.na(dx_status), dx_status := 0]   
  17. R/utils.R line 108: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L108)
    n_het = n_hom = n_wt = NULL   
  18. R/utils.R line 111: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L111)
    dCounts[, n_wt := sum(lmInput$allele_count == 0)]   
  19. R/utils.R line 112: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L112)
    dCounts[, n_het := sum(lmInput$allele_count == 1)]   
  20. R/utils.R line 113: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L113)
    dCounts[, n_hom := sum(lmInput$allele_count == 2)]   
  21. data-raw/phers_create_data.R line 71: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/data-raw/phers_create_data.R#L71)
    IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd   
  22. data-raw/phers_create_data.R line 81: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/data-raw/phers_create_data.R#L81)
    icdSampleAll = icdSampleAll[, entry_date := sample(entryDates, nrow(icdSampleAll))]   

    To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

    
    filename,line_number,message,line
    R/genetic_association.R,44,Variable and function name style should be camelCase.,diseaseId = disease_id = snp = allele_count = count = N = vid = NULL
    R/genetic_association.R,127,Variable and function name style should be camelCase.,ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het = n_hom =
    R/genetic_association.R,128,Variable and function name style should be camelCase.,n_total = n_wt = NULL
    R/genetic_association.R,139,Variable and function name style should be camelCase.,"lmInput1[allele_count == 2, allele_count := 1]}"
    R/genetic_association.R,142,Variable and function name style should be camelCase.,"lmInput1[allele_count == 1, allele_count := 0]"
    R/genetic_association.R,143,Variable and function name style should be camelCase.,"lmInput1[allele_count == 2, allele_count := 1]}"
    R/genetic_association.R,146,Variable and function name style should be camelCase.,"lmInput1[, allele_count := as.factor(allele_count)]"
    R/genetic_association.R,162,Variable and function name style should be camelCase.,"glmStat[, ci_lower := ci[varName, 1]]"
    R/genetic_association.R,163,Variable and function name style should be camelCase.,"glmStat[, ci_upper := ci[varName, 2]]}"
    R/phers.R,32,Variable and function name style should be camelCase.,flag = icd = person_id = . = NULL
    R/phers.R,83,Variable and function name style should be camelCase.,phecode = person_id = . = prev = w = NULL
    R/phers.R,116,Variable and function name style should be camelCase.,person_id = phecode = disease_id = w = score = . = NULL
    R/phers.R,157,Variable and function name style should be camelCase.,disease_id = diseaseId = resid_score = . = person_id = score = NULL
    R/positive_control.R,26,Variable and function name style should be camelCase.,dx_status = entry_date = uniq_dates = . = NULL
    R/positive_control.R,46,Variable and function name style should be camelCase.,"cases[, dx_status := 1]"
    R/positive_control.R,55,Variable and function name style should be camelCase.,"dxStatus[is.na(dx_status), dx_status := 0]"
    R/utils.R,108,Variable and function name style should be camelCase.,n_het = n_hom = n_wt = NULL
    R/utils.R,111,Variable and function name style should be camelCase.,"dCounts[, n_wt := sum(lmInput$allele_count == 0)]"
    R/utils.R,112,Variable and function name style should be camelCase.,"dCounts[, n_het := sum(lmInput$allele_count == 1)]"
    R/utils.R,113,Variable and function name style should be camelCase.,"dCounts[, n_hom := sum(lmInput$allele_count == 2)]"
    data-raw/phers_create_data.R,71,Variable and function name style should be camelCase.,IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd
    data-raw/phers_create_data.R,81,Variable and function name style should be camelCase.,"icdSampleAll = icdSampleAll[, entry_date := sample(entryDates, nrow(icdSampleAll))]"