hugheylab / phers

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

lintr found issues with code #74

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago
  1. R/genetic_association.R line 56: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L56)
    diseaseId = disease_id = snp = allele_count = count = N = vid = person_id = NULL   
  2. R/genetic_association.R line 68: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L68)
    lmInput[, person_id := as.character(person_id)]   
  3. R/genetic_association.R line 102: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L102)
    ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het =   
  4. R/genetic_association.R line 103: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L103)
    n_hom = n_total = n_wt = NULL   
  5. R/genetic_association.R line 111: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L111)
    lmInput1[allele_count == 2, allele_count := 1]}   
  6. R/genetic_association.R line 114: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L114)
    lmInput1[allele_count == 1, allele_count := 0]   
  7. R/genetic_association.R line 115: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L115)
    lmInput1[allele_count == 2, allele_count := 1]}   
  8. R/genetic_association.R line 118: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L118)
    lmInput1[, allele_count := as.factor(allele_count)]   
  9. R/genetic_association.R line 135: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L135)
    glmStat[, ci_lower := ci[1L]]   
  10. R/genetic_association.R line 136: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_association.R#L136)
    glmStat[, ci_upper := ci[2L]]}   
  11. R/genetic_diagnosis.R line 29: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L29)
    dx_status = entry_date = uniq_dates = . = NULL   
  12. R/genetic_diagnosis.R line 44: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L44)
    dxIcd[, dx_status := -1L]   
  13. R/genetic_diagnosis.R line 45: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L45)
    dxIcd[uniq_dates >= minUniqueDates, dx_status := 1L]   
  14. R/genetic_diagnosis.R line 51: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/genetic_diagnosis.R#L51)
    dxStatus[is.na(dx_status), dx_status := 0L]   
  15. R/phers.R line 37: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L37)
    flag = icd = person_id = . = NULL   
  16. R/phers.R line 77: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L77)
    phecode = person_id = . = prev = w = NULL   
  17. R/phers.R line 114: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L114)
    person_id = phecode = disease_id = w = score = . = NULL   
  18. R/phers.R line 158: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/phers.R#L158)
    disease_id = diseaseId = resid_score = . = person_id = score = NULL   
  19. R/utils.R line 138: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L138)
    n_het = n_hom = n_wt = NULL   
  20. R/utils.R line 140: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L140)
    dCounts[, n_wt := sum(lmInput$allele_count == 0)]   
  21. R/utils.R line 141: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L141)
    dCounts[, n_het := sum(lmInput$allele_count == 1)]   
  22. R/utils.R line 142: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/R/utils.R#L142)
    dCounts[, n_hom := sum(lmInput$allele_count == 2)]   
  23. data-raw/phers_create_data.R line 88: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/data-raw/phers_create_data.R#L88)
    icdSampleAll[, entry_date := sample(entryDates, nrow(icdSampleAll))]   
  24. data-raw/phers_create_data.R line 95: Variable and function name style should be camelCase. (https://github.com/hugheylab/phers/blob/main/data-raw/phers_create_data.R#L95)
    icdSampleMarfan[, entry_date := sample(entryDates, nrow(icdSampleMarfan))]   
  25. inst/extdata/run_plink.R line 15: Lines should not be more than 120 characters. (https://github.com/hugheylab/phers/blob/main/inst/extdata/run_plink.R#L15)
    plinkCmnd = glue('--simulate {plinkSimPath} --make-bed --out {plinkOut} --simulate-ncases {npop/2} --simulate-ncontrols {npop/2} --seed 1')   

    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,56,Variable and function name style should be camelCase.,diseaseId = disease_id = snp = allele_count = count = N = vid = person_id = NULL
    R/genetic_association.R,68,Variable and function name style should be camelCase.,"lmInput[, person_id := as.character(person_id)]"
    R/genetic_association.R,102,Variable and function name style should be camelCase.,ci_lower = melt = pval = se = ci_upper = allele_count = varName = n_het =
    R/genetic_association.R,103,Variable and function name style should be camelCase.,n_hom = n_total = n_wt = NULL
    R/genetic_association.R,111,Variable and function name style should be camelCase.,"lmInput1[allele_count == 2, allele_count := 1]}"
    R/genetic_association.R,114,Variable and function name style should be camelCase.,"lmInput1[allele_count == 1, allele_count := 0]"
    R/genetic_association.R,115,Variable and function name style should be camelCase.,"lmInput1[allele_count == 2, allele_count := 1]}"
    R/genetic_association.R,118,Variable and function name style should be camelCase.,"lmInput1[, allele_count := as.factor(allele_count)]"
    R/genetic_association.R,135,Variable and function name style should be camelCase.,"glmStat[, ci_lower := ci[1L]]"
    R/genetic_association.R,136,Variable and function name style should be camelCase.,"glmStat[, ci_upper := ci[2L]]}"
    R/genetic_diagnosis.R,29,Variable and function name style should be camelCase.,dx_status = entry_date = uniq_dates = . = NULL
    R/genetic_diagnosis.R,44,Variable and function name style should be camelCase.,"dxIcd[, dx_status := -1L]"
    R/genetic_diagnosis.R,45,Variable and function name style should be camelCase.,"dxIcd[uniq_dates >= minUniqueDates, dx_status := 1L]"
    R/genetic_diagnosis.R,51,Variable and function name style should be camelCase.,"dxStatus[is.na(dx_status), dx_status := 0L]"
    R/phers.R,37,Variable and function name style should be camelCase.,flag = icd = person_id = . = NULL
    R/phers.R,77,Variable and function name style should be camelCase.,phecode = person_id = . = prev = w = NULL
    R/phers.R,114,Variable and function name style should be camelCase.,person_id = phecode = disease_id = w = score = . = NULL
    R/phers.R,158,Variable and function name style should be camelCase.,disease_id = diseaseId = resid_score = . = person_id = score = NULL
    R/utils.R,138,Variable and function name style should be camelCase.,n_het = n_hom = n_wt = NULL
    R/utils.R,140,Variable and function name style should be camelCase.,"dCounts[, n_wt := sum(lmInput$allele_count == 0)]"
    R/utils.R,141,Variable and function name style should be camelCase.,"dCounts[, n_het := sum(lmInput$allele_count == 1)]"
    R/utils.R,142,Variable and function name style should be camelCase.,"dCounts[, n_hom := sum(lmInput$allele_count == 2)]"
    data-raw/phers_create_data.R,88,Variable and function name style should be camelCase.,"icdSampleAll[, entry_date := sample(entryDates, nrow(icdSampleAll))]"
    data-raw/phers_create_data.R,95,Variable and function name style should be camelCase.,"icdSampleMarfan[, entry_date := sample(entryDates, nrow(icdSampleMarfan))]"
    inst/extdata/run_plink.R,15,Lines should not be more than 120 characters.,plinkCmnd = glue('--simulate {plinkSimPath} --make-bed --out {plinkOut} --simulate-ncases {npop/2} --simulate-ncontrols {npop/2} --seed 1')