hugheylab / phers

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

lintr found issues with code #44

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago
  1. R/genetic_association.R line 43: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L43)
    diseaseId = disease_id = snp = allele_count = count = N = vid = NULL 
  2. R/genetic_association.R line 125: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L125)
    ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het = n_hom = 
  3. R/genetic_association.R line 126: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L126)
    n_total = n_wt = NULL 
  4. R/genetic_association.R line 140: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L140)
    lmInput1[, allele_count := as.factor(allele_count)] 
  5. R/genetic_association.R line 156: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L156)
    glmStat[, ci_lower := ci[varName, 1]] 
  6. R/genetic_association.R line 157: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L157)
    glmStat[, ci_upper := ci[varName, 2]]} 
  7. 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 
  8. R/phers.R line 78: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L78)
    phecode = person_id = . = prev = w = NULL 
  9. R/phers.R line 111: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L111)
    person_id = phecode = disease_id = w = score = . = NULL 
  10. R/phers.R line 152: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L152)
    disease_id = diseaseId = resid_score = . = person_id = score = NULL 
  11. R/positive_control.R line 22: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L22)
    dx_status = NULL 
  12. R/positive_control.R line 35: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L35)
    cases[, dx_status := 'case'] 
  13. R/positive_control.R line 40: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/positive_control.R#L40)
    dxStatus[is.na(dx_status), dx_status := 'control'] 
  14. R/utils.R line 99: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L99)
    n_het = n_hom = n_wt = NULL 
  15. R/utils.R line 102: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L102)
    dCounts[, n_wt := sum(lmInput$allele_count == 0)] 
  16. R/utils.R line 103: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L103)
    dCounts[, n_het := sum(lmInput$allele_count == 1)] 
  17. R/utils.R line 104: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L104)
    dCounts[, n_hom := sum(lmInput$allele_count == 2)] 
  18. data-raw/phers_create_data.R line 80: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/data-raw/phers_create_data.R#L80)
    IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd 

    If you want to exclude these style issues from being counted, save the following as lint_exclude.csv in the repository:

    
    filename,line_number,message,line
    R/genetic_association.R,43,Variable and function name style should be camelCase.,diseaseId = disease_id = snp = allele_count = count = N = vid = NULL
    R/genetic_association.R,125,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,126,Variable and function name style should be camelCase.,n_total = n_wt = NULL
    R/genetic_association.R,140,Variable and function name style should be camelCase.,"lmInput1[, allele_count := as.factor(allele_count)]"
    R/genetic_association.R,156,Variable and function name style should be camelCase.,"glmStat[, ci_lower := ci[varName, 1]]"
    R/genetic_association.R,157,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,78,Variable and function name style should be camelCase.,phecode = person_id = . = prev = w = NULL
    R/phers.R,111,Variable and function name style should be camelCase.,person_id = phecode = disease_id = w = score = . = NULL
    R/phers.R,152,Variable and function name style should be camelCase.,disease_id = diseaseId = resid_score = . = person_id = score = NULL
    R/positive_control.R,22,Variable and function name style should be camelCase.,dx_status = NULL
    R/positive_control.R,35,Variable and function name style should be camelCase.,"cases[, dx_status := 'case']"
    R/positive_control.R,40,Variable and function name style should be camelCase.,"dxStatus[is.na(dx_status), dx_status := 'control']"
    R/utils.R,99,Variable and function name style should be camelCase.,n_het = n_hom = n_wt = NULL
    R/utils.R,102,Variable and function name style should be camelCase.,"dCounts[, n_wt := sum(lmInput$allele_count == 0)]"
    R/utils.R,103,Variable and function name style should be camelCase.,"dCounts[, n_het := sum(lmInput$allele_count == 1)]"
    R/utils.R,104,Variable and function name style should be camelCase.,"dCounts[, n_hom := sum(lmInput$allele_count == 2)]"
    data-raw/phers_create_data.R,80,Variable and function name style should be camelCase.,IcdCodes = icdPhecodeMap[flag == flag1 & !(icd %in% diseaseDxIcdMap[disease_id == marfanId]$icd)]$icd